Tags
,
Asked 11 days ago
10 Jan 2018
Views 35
jaggy

jaggy posted

JSON.parse object value not accessible


var data ='{"assigned-to":"4","mname":"jaggy","green":0}';
 var d=JSON.parse(data);
alert(d.mname);
alert(d.assigned-to);


json have used "-" at key name so when i call with object JSON . it cant accessible
Post Answer