[Solved] json parse with jQuery loop [closed]


It should be

$.each(data.results[0].address_components, function(i,inside)

instead of

$.each(data.results.address_components, function(i,inside)

because you are taking data from the first results set. Here is a demo

Note: I don’t know if there can be multiple results. If it can, then you must first iterate over the results and then inside it on address_components.

1

solved json parse with jQuery loop [closed]