Javascript examples for jQuery:Json
Manipulating JSON data sets with $.map() function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(window).load(function(){//w ww . jav a 2 s .co m myarr = [{ "a":"", "b":"test 1"}, { "q":"", "b":"test 2"}, { "g":"", "b":"test 3"}, { "h":"", "d":"not this"} ]; var b_arr = $.map(myarr, function(val, i) { return val.b }); console.log(b_arr) }); </script> </head> <body> </body> </html>