我正在循环浏览以下json。我得到的id和名字很好,但是当我做json.templates[i].dailyemails.length
它总是返回0从json子阵列获取数据
这里是我的JSON:
{
"templates":[
{
"id":"2c1d99d9b6b2fb417601d24c10c9b041a7d6f37b",
"dailyemails":[
"[email protected]",
"[email protected]"
],
"name":"Registration Report"
},
{
"id":"7d7cc642ca13cc4a998cad364dfe8e623fd95ae3",
"dailyemails":[
"[email protected]"
],
"name":"Live Report"
}
]
}