Hi everyone
I am using Arduino_JSON lib to get the data from an API.
I need to print the data in display so i need to extract it.
when the data is coming in simple form like below
{"status":"SUCCESS","msg":"","deviceID":"ABC","deviceTitle":"Test","deviceStatus":"active","name":"Venom","date_of_birth":"2015-01-22"}
the I am able to extract it using this way
JSONVar deviceID = myObject[keys[2]];
JSONVar deviceTitle = myObject[keys[3]];
JSONVar deviceStatus = myObject[keys[4]];
JSONVar Name = myObject[keys[5]];
JSONVar date_of_birth = myObject[keys[6]];
But now data is coming in Nested Json Array and I am confused how to get it out
[
{
"medicine_name": "Paracetamol",
"instruction": "In case of fever",
"medicine_start_date": "2022-08-09",
"medicine_end_date": "2022-08-15",
"t1": "08:00:00",
"t2": "",
"t3": "16:00:00",
"t4": ""
},
{
"medicine_name": "Crocin",
"instruction": "Body Pain",
"medicine_start_date": "2022-08-09",
"medicine_end_date": "2022-08-10",
"t1": "08:00:00",
"t2": "",
"t3": "",
"t4": ""
}
]
Please help me solve this problem.
Regards
Rajbir