jquery - I want to get value from my json by field name -


i'm working json data, problem want 1 of field "sz_price" list. found code internet that's supposed valid action still don't understand method single value. don't want use loop, have single field want.

{"label":"4mm","sz_stock":"","sz_price":"50","sz_id":"6","count":1}]  $.getjson("check.php", function(result){             $.each(result, function(i, field){                 $("div").append(field + " ");             });         }); 

you should use instead loop:

$("div").append(result["sz_price"]); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -