I have arrays in my JSON like this:
[
{
"id":"bobbys_burgers",
"is_enabled":true,
"name":"Bobbys Burgers",
"supported_transactions":[
"222",
"111",
"333"
],
"enrollment_required":[
],
"restricted_transactions":[
"123"
]
},
{
"id":"randys_sandwich",
"is_enabled":true,
"name":"Randys Sandwich",
"supported_transactions":[
"321"
],
"enrollment_required":[
],
"restricted_transactions":[
]
},
]
I want to get all the keys of the whole array where id
= randys_sandwich
. for example, i want to search for id
== randys_sandwich
and return the is_enabled
, name
, supported_transactions
, etc AND their values from that array. how can i do that in php?