I have JSON which is formatted like example below which is correct way to loop whole file to catch "IWANTTHIS" values? All arrays are on same level in JSON ("some:products"). Just too complicated JSON for me in this afternoon...
{
"type": "page",
"pageType": "section",
"_links": {},
"_embedded": {
"somkindof:blocks": [
{
"somevalue": 25,
"_embedded": {
"some:products": [
{
"system": {
"availability": {},
"IWANTTHIS": "20284",
"hhhh": []
},
....
I tried something like this but I cant catch values formatted like in my example.
$jfo = json_decode($vcurl);
$channel = $jfo->_embedded->[somkindof:blocks];
var_dump $channel;
$channel = $jfo->_embedded->{'somkindof:blocks'}(You may find using it as an array easier, look at json_decode parameter 2 in the PHP docs)