我正在尝试将传入的 JSON 对象格式化为 JSON 对象到输出中
输入:
{
"id" : "001",
"firstArray":[
{
"tid" : 9,
"secondArray":[
{
"keep1" : "value1",
"keep2" : "value2",
"remove1" : "somevalue1",
"remove2" : "somevalue2"
},
{...}
]
},
{
"tid" : 8,
"secondArray":[
{
"keep1" : "value1",
"keep2" : "value2",
"remove1" : "somevalue1",
"remove2" : "somevalue2"
},
{...}
]
}
]
}
我想过滤这个对象(删除一些无用的属性)并有这样的东西。
输出:
{
"id" : "001",
"firstArray":[
{
"tid" : 9,
"secondArray":[
{
"keep1" : "value1",
"keep2" : "value2"
},
{...}
]
},
{
"tid" : 8,
"secondArray":[
{
"keep1" : "value1",
"keep2" : "value2"
},
{...}
]
}
]
}
有人可以帮助我查询或指出正确的方向。谢谢