I'm constructing a JSON based on certain values,
my code is as follows,
var txt = '{ \"' + 9837 + '\": "Cost-A", \"' + 8943 + '\": "Cost-B", \"' + 13917 + '\": "Cost-C", \"' + 13917 + '\": "Cost-D"}'; _obj = JSON.parse(txt); The output I get in the console is,
Object {9837: "Cost-A", 8943: "Cost-B", 13917: "Cost-D"} Cost-C has been skipped completely? or is there something trivial I'm missing? How can I solve this?