在ionic中循环使用JSON

在ionic中循环使用JSON,json,typescript,ionic-framework,ionic3,Json,Typescript,Ionic Framework,Ionic3,有没有一种方法可以像下面的ionic 3那样循环使用JSON [ { "date": "28/09/2017 08:03", "data": { "1": 10, "2": 0 } }, { "date": "28/09/2017 08:04", "data": { "1": 0, "2": 5 } } ] 我已经试着循环了一遍,但没有用。这是我最近一次尝试,但没有成功 this.data = returnedJson;

有没有一种方法可以像下面的ionic 3那样循环使用JSON

[
 {
   "date": "28/09/2017 08:03",
   "data": {
     "1": 10,
     "2": 0
   }
},
{
   "date": "28/09/2017 08:04",
   "data": {
    "1": 0,
    "2": 5
   }
}
]
我已经试着循环了一遍,但没有用。这是我最近一次尝试,但没有成功

this.data = returnedJson;

  for (let reportData of this.data.data) {
        console.log("Our Data : " + reportData);
    }

试试这个:

for (const item of this.data) {
    console.log("Our Data : " + item.data);
}

this.data
是您需要循环使用的数组,而不是
this.data.data
我现在可以循环使用您提供的cod的日期,但无法获取数据<代码>项目.数据返回对象,而不是itOh中的数字!我明白了。刚穿过阵列,它就成功了
for (const item of this.data) {
    console.log("Our Data : " + item.data);
}