I have an array of arrays which looks like below:
UserList=[
[name:"user1", type:"admin", location:"NY", expired:"NO"],
[name:"user2", type:"poweruser", location:"CO", expired:"NO"],
[name:"user3", type:"admin", location:"SF", expired:"NO"],
]
I want to add the three properties name, type and location and create a new property in each individual array like the property "AllProps" in the below example:
Desired Output:
UserList=[
[name:"user1", type:"admin", location:"NY", expired:"NO",AllProps:"user1adminNY"],
[name:"user2", type:"poweruser", location:"CO", expired:"NO",AllProps:"user1poweruserCO"],
[name:"user3", type:"admin", location:"SF", expired:"NO", AllProps:"user1adminSF"],
]
Can I do this using Loadash? What is the best and fastest way to do this?