Is it possible to iterate through a JSON structure like the one shown below in Ionic 3?
[
{
"date": "28/09/2017 08:03",
"data": {
"1": 10,
"2": 0
}
},
{
"date": "28/09/2017 08:04",
"data": {
"1": 0,
"2": 5
}
}
]
I have attempted to loop through this data without success. The latest approach I tried is as follows:
this.data = returnedJson;
for (let reportData of this.data.data) {
console.log("Our Data : " + reportData);
}
and
for (let reportData in this.data.data) {
console.log("Our Data : " + reportData);
}