Reputation: 1386
I'm working on a mobile application using Flutter.
I'm new to JSON. How do I retrieve multiple values from a JSON object?
body: new Column(
children: <Widget>[
new ListTile(
title: new Text("$(_jsondata['name'])"),// json object calling
),
]
);
) got the values but now i want to call multiple values like desc
, url
, id
other fields. I tried $(_jsondata['name']['desc'])
but unable to achieve.
Upvotes: 0
Views: 1136
Reputation: 31376
your _jsondata
is Map is String and dynamic to get the value of the field use it's name like this _jsondata['name']
and do the same for other fields _jsondata['url']
Upvotes: 2