this is my first array
data= [{
"id":1111,
"date":"2020-08-03T08:00:00+00:00",
"age":23,
"email":"test@yahoo.com",
"address":"phill road",
"salary":1222.00
},
{
"id":222,
"date":"2020-08-03T08:00:00+00:00",
"age":24,
"email":"tes22t@yahoo.com",
"address":"phill2222 road",
"salary":3344
}
]
second array should look like this
dataNew= [1222.00,3344]
I need second array that only contain the salary value . How can I filter the first array, that if the keys name = "salary" , push the value to new array. Searched for so many suggestion, but nothing seems working for me..