我正在循環瀏覽以下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"
}
]
}