How to avoid to adding some characters when adding a new item in JSON with Java Script

I’m trying to add a new item to JSON with the following code ;

var obj = JSON.parse(jsoncontent);
obj["subnets"]["values"].push('{"gateway": "","prefixLength": 24,"dnsSuffix": null,"dnsServer1": "","dnsServer2": "","ipRanges":.... .bla bla bla');

But, as you can see at below, new items is adding with “” and “” characters. How can I avoid this ?

    "gateway": "",
    "prefixLength": 24,
    "dnsSuffix": null,
    "dnsServer1": "",
    "dnsServer2": "",
    "ipRanges": {
        "values": []
    "enabled": false,
    "totalIpCount": 0,
    "usedIpCount": null,
    "primaryIp": null,
    "autoAllocateIpRanges": false
"{  "gateway": "",  "prefixLength": 24,  "dnsSuffix": null,  "dnsServer1": "",  "dnsServer2": "",  "ipRanges": {    "values": []  },  "enabled": false,  "totalIpCount": 0,  "usedIpCount": null,  "primaryIp": null,  "autoAllocateIpRanges": false}"


In your push function, you append a string instead of an object. Try to remove quotes around this object.

obj["subnets"]["values"].push({"gateway": "","prefixLength": 24,"dnsSuffix": null,"dnsServer1": "","dnsServer2": ""});