【发布时间】:2017-05-11 08:30:11
【问题描述】:
[
{
"Office_Id": 100,
"Address1": "xxxxx",
"Address2": "",
"City": "ANNISTON",
"District_Id": 1277,
"OfficeName": "test"
},
{
"Office_Id": 200,
"Address1": "xxxxx",
"Address2": "",
"City": "ANNISTON",
"District_Id": 1277,
"OfficeName": "test"
},
{
"Office_Id": 300,
"Address1": "xxxxx",
"Address2": "",
"City": "ANNISTON",
"District_Id": 1277,
"OfficeName": "test"
}
]
如何仅使用 Office_Id 和 OfficeName 进行过滤
【问题讨论】:
-
你使用了
filter这个词——我不认为它意味着你认为的那样。您只想要某些 office_id/officename,还是想要所有对象但只有这两个属性? -
你的意思是你想剥离所有其他的东西并只保留所有对象中的这两个属性?另外,分享你迄今为止尝试过的东西..
标签: javascript angularjs lodash