我的json对象数组为
{
"_index": [
"houseid"
],
"added": [
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
}
],
"changed": [],
"removed": [
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
},
{
"description": "detail about column",
"houseid": "la 123",
"\ufeffID": "154"
}
]
}
我想应用一个循环,以便我可以提供添加的详细信息,删除更改如下: 描述houseid effid 关于列la 123 154的细节 关于列la 123 154的详细信息
答案 0 :(得分:0)
只需输入一些名字,然后得到你想要的东西。
import data from '../../result/result.json';
/* somewhere */
let to-add = data.toadd; // get field what you want.
答案 1 :(得分:0)