Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
import 'dart:convert'; void main() { String json = '[{"fruit": "Apple", "price": 3}, {"fruit": "Banana", "price": 2}]'; List
items = jsonDecode(json); for (var item in items) { print('${item['fruit']} costs ${item['price']} dollars'); } }
Apple costs 3 dollars
Banana costs 2 dollars