{
"June": [
{
"id": "59361b2fa413468484fc41d29d5",
"is_new": false,
"name":"John"
"updated_at": "2017-06-07 10:52:05",
}
]
}
I have above object and within it it has array of object, I tried to check within 'June', is there any is_new, but failed?
const has_any_is_new = Object.keys(arr).map(obj =>
arr[obj].map(obj2 => obj2.findIndex(o => o.is_new) > -1)
);