Hello,
<noob>
Hi I'm using an API that returns JSON. I have converted the return JSON using "json_decode", into a multidimensional array.
I need to find the number of a certain key with a specified Value (in this case bool = true). I don't seem to be able to find any functions to do this.
In a nutshell each of the child arrays is a re-iteration of the same array, I just need to find how many (child arrays) have a certain key that has a true value, I.E. how many of the child arrays have a true value for the 'foo' key.
I'm sure there is probably a function to do this, or will I have to foreach though and add it up? It's a little frustrating!
Thanks for any help
</noob>
<noob>
Hi I'm using an API that returns JSON. I have converted the return JSON using "json_decode", into a multidimensional array.
I need to find the number of a certain key with a specified Value (in this case bool = true). I don't seem to be able to find any functions to do this.
In a nutshell each of the child arrays is a re-iteration of the same array, I just need to find how many (child arrays) have a certain key that has a true value, I.E. how many of the child arrays have a true value for the 'foo' key.
I'm sure there is probably a function to do this, or will I have to foreach though and add it up? It's a little frustrating!
Thanks for any help
</noob>