So, I have:
"people": [
{
"first": "Linda",
"last": "Donson",
"salary": "4000USD"
},
{
"first": "Mark",
"last": "Sullivan",
"salary": "3500USD"
},
];
Now, I want to convert this into a new array of objects, containing only desired set of data. For example:
"people": [
{
"first": "Linda",
"salary": "4000USD"
},
{
"first": "Mark",
"salary": "3500USD"
},
];
How can I do this? So, it should take out the "last"
key and its values and return only "first"
and "last"
.
Thanks