Found (2) results for "json loop"

Loop through a json object data using javascript or jquery

If you have a data object that is json encoded and need to iterate through the inner data objcets here are different suggestions

json_encode & JSON.parse

Sometimes, you will need to transform a php array into a json string in order to send it to a javascript code to work on it. In this case you will have to use the php built in function json_encode($phpArray) and then in javascript code, you have to transform this json string into an object so that you can iterate over it or do whatever you want with it, Now on javascript you can do this by using JSON.parse(allSearchableTags)