Lodash:添加属性的范围

时间:2017-05-11 11:44:55

标签: lodash

[
  {
    "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"
  }
]

使用lodash如何通过组合Office_Id和OfficeName

添加新属性
{
        "Office_Id": 300,
         "Address1": "xxxxx",
        "Address2": "",
        "City": "ANNISTON",
        "District_Id": 1277,
        "OfficeName": "offce_ttttt",
         "office": "300 - offce_ttttt"
      }

0 个答案:

没有答案