我正在接收下一个JSON响应
{
"timetables":[
{"id":87,"content":"B","language":"English","code":"en"},
{"id":87,"content":"a","language":"Castellano","code":"es"}],
"id":6,
"address":"C/Maestro José"
}
我想实现下一个伪代码功能
for(var i in json) {
if(json[i] is Array) {
// Iterate the array and do stuff
} else {
// Do another thing
}
}
相似问题