我需要删除属性名称' version_Dev'和' version_Value'来自JSON数组。
var jsonObject_Value = [
Object { name="TitleDAY", value=undefined},
Object { name="Name", value=Jessica},
Object { name="Code", value="rt123"},
Object { name="ForId", value="26"},
Object { name="TypeId", value="262"},
Object { name="Title", value=null},
Object { name="version_Value", value=1},
Object { name="Id", value=140767},
Object { name="version_Dev", value=1},
Object { name="haz", value=null},]
如果我尝试使用delete jsonObject,如果在json对象中发生序列化或者添加了任何新字段,则以下解决方案是No use它将删除其他一些属性:
delete jsonObject_Value[7];
delete jsonObject_Value[9];
预期产出:
[
Object { name="TitleDAY", value=undefined},
Object { name="Name", value=Jessica},
Object { name="Code", value="rt123"},
Object { name="ForId", value="26"},
Object { name="TypeId", value="262"},
Object { name="Title", value=null},
undefined,
Object { name="Id", value=140767},
undefined,
Object { name="haz", value=null},
]