I have this array:
aItems = [{ "PropertyA": "apple", "PropertyB": "banana", "PropertyC": "dog", "PropertyD": "hotdog", "PropertyE": "coldcat", "PropertyF": "Y", "PropertyG": "N" }, ..., { "PropertyA": "this", "PropertyB": "is", "PropertyC": "json", "PropertyD": "code", "PropertyE": "wow", "PropertyF": "N", "PropertyG": "N" }]
I would like to use lodash to get this result:
aItems = [{ "propertyA": "apple", "propertyB": "banana", "propertyC": "dog", "propertyD": "hotdog", "propertyE": "coldcat", "propertyNEW": true, "propertyG": false }, ..., { "propertyA": "this", "propertyB": "is", "propertyC": "json", "propertyD": "code", "propertyE": "wow", "propertyNEW": false, "propertyG": false }]
I want to map each property name to different names and change the value for some specific properties. Can I do this with lodash?
padibro Jun 19 '15 at 14:02 2015-06-19 14:02
source share