forexknight forexknight - 11 months ago 42
jQuery Question

How to access json muliple data

I want to ask how can I access to my multiple data in jquery (json response).
Here's how my data looks like:
enter image description here

How can I display all kid's names?



Assuming the call is:

    // code here

You can loop through if you want to work on one item at a time.

for (var i in {

If you want to extract all the names, you can use jquery .map, eg:

var names = $(,e) { return }).get();

then you can show them all in one go:

console.log(names.join(", "))

Here's a fiddle, with console output: