Skip to content
Advertisement

Getting value of an array inside two arrays

I’m trying to get the value of the array, but I just cant quite get to it. I’m trying with a foreach loop and with key and values. But I can’t get it right. I’m working with wordpress custom field, and I’m trying to retrieve product ID, so that I can manipulate website data.

This is the array:

JavaScript

And I’m trying to retrieve value “product”, to be more specific the value number that’s inside with this approach:

JavaScript

Advertisement

Answer

I did like this and it works now..

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement