How to parse an array of json object in jquery -


i have following array of json object

[{"id":10,"name":"sinu"},{"id":20,"name":"shinto"}]

how can parse using jquery , names, id of each one.

thanks in advance

var data = [{"id":10,"name":"sinu"},{"id":20,"name":"shinto"}];      jquery(data).each(function(i, item){          $('#output').append(item.id + ' ' + item.name + '<br>');      })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <div id="output"></div>

var data = [{"id":10,"name":"sinu"},{"id":20,"name":"shinto"}]; jquery(data).each(function(i, item){     console.log(item.id, item.name) }) 

Comments