How would I find all values of a specific key in an array of nested objects?
Example data:
[
{
"id": 14252373,
"name": "foo",
"url": "/test",
"private": true,
"owner": {
"login": "username",
"id": 1217786,
},
"permissions": {
"admin": {
"id": 1567283
},
"push": false,
"pull": true
}
}
]
How would I get an array of all id
values?
Desired output:
[14252373, 1217786, 1567283]