js json生取key,value 值
2021-02-18 19:19
标签:key war amp bsp code length this item let for="item in dataView">
{{item.key}}:
{{item.value}}
js json生取key,value 值 标签:key war amp bsp code length this item let 原文地址:https://www.cnblogs.com/Byme/p/12937973.html this.dataView = [];
if (data.dataView && data.dataView != null) {
let dataViewArr = JSON.parse(data.dataView);
for (var key in dataViewArr) {
this.dataView.push({
key: key,
value: dataViewArr[key]
});
}
}