I am using PHP, jQuery, and JSON. Now I need to know how to parse the jQuery data in JavaScript.
You try to use a variable named json which is not defined in the scope of your function. Instead you have to use the argument named a.
function pass(a) { var i; while(i = a.pop()) { alert(i.name + " " + i.distance); } }