Search code examples
phpjqueryarraysjsongetjson

how to get specific value in JSON array with PHP


As you see in the image:

enter image description here

I've a array of object I think there is JSON array. I want to get only "productThumbnailUrl" on this array and use that in another way.

Can anyone help me to get this value and store it in a separate variable.

It's has multiple rows on the array. I only want get "productThumbnailUrl".


Solution

  • You can use For loop to loop json data

    for(x in json) {
        console.log(json[x].productThumbnailUrl);
    }