Flutter how can i show the array data of array.
My data looks like this
I/flutter ( 7557): {count: 1,
records: [{
cnic: 42501-0978008-5,
name: abc
family_members: [{
gender: F,
name: Dua Batool,
age: 8,
relationship: Daughter
},
{
gender: M,
name: Shayan,
age: 9,
relationship: Son
}
]}]}
What I need to do is I need to print the name of Family members array.
My code is this
Future<List> doSomeAsyncStuff() async {
final storage = new FlutterSecureStorage();
String value = await storage.read(key: 'Cnic');
print(value);
String url = 'http://api.igiinsurance.com.pk:8888/insurance_IgiGen/insurance-api/get_company_employee.php?offset=0&limit=1&cnic=${value}' ;
final msg = jsonEncode({"cnic": value});
Map<String,String> headers = {'Content-Type':'application/json'};
String token = value;
final response = await http.get(url);
var Data = json.decode(response.body);
print(Data);
}
Its printing Data value ,as I show you on the upper side of question, I need to print the Family members name. I know its stupid question but I am not able to print the name of the Familymembers array