我正在尝试将传入的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"
},
{...}
]
}
]
}
有人可以帮我查询或指出正确的方向。 感谢
答案 0 :(得分:0)