Im trying to loop through an array of objects, which have different keys. Is there a way that I can pick an object based on they key?
var array = [
{
"1400": "Accident and Health"
},
{
"100": "Life"
},
{
"1300": "Pension"
}
]
var a = "100";
var pop = _.pick(array,a);
console.log(pop);
Desired output:
Life
Thank you!