I'm working with Ionic 3 and I'm consuming an API that gets as response a json with nested objects. I need to show some part of these objects in a chart.js graph bar.
I'm not familiar with manipulating json objects.
{
"fruits": [
{
"oranges": {
"good": 1,
"not_good": 0
},
"apples": {
"good": 1,
"not_good": 0
},
"grapes": {
"good": 2,
"not_good": 0
}
}]
}
I dont know how many fruits will be there in the response.
The fruits's names would be the labels and the 'good' and 'not good' would be the datasets.