遍历JSON获取Key
var contentInfo:={
title: "AAA",
approver: "BBB",
zoneOfAction: "上海浦东"
}
var contentInfoJson=JSON.stringify(this.contentInfo);
var contents=JSON.parse(contentInfoJson);
for(var key in contents){
console.log(key);
console.log(contents[key]);
}
网友评论