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

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -