There is an object:
sptn={"orders":[{"externalOrderId":19,"externalCustomerId":0,"status":"INITIALIZED","date":"2017-08-10 19:25:17","paymentMethod":"Credit Card","restoreUrl":"market.com","deliveryAddress":", , ","items":[{"externalItemId":"52","name":"\u0441\u043a\u0438\u0434\u043a\u04302","category":"Cameras","quantity":1,"cost":444,"url":"\/index.php?route=product\/product&product_id=52","imageUrl":"","description":"<p><br><\/p>"}]}]} You must add more keys to it; add like this:
sptn.orders =[{"ddd":44,"costin":444}] //стирается все элементы How can I add it to get this structure?
sptn={"orders":[{"externalOrderId":19,"externalCustomerId":0,"ddd":44,"costin":444,"status":"INITIALIZED","date":"2017-08-10 19:25:17","paymentMethod":"Credit Card","restoreUrl":"market.com","deliveryAddress":", , ","items":[{"externalItemId":"52","name":"\u0441\u043a\u0438\u0434\u043a\u04302","category":"Cameras","quantity":1,"cost":444,"url":"\/index.php?route=product\/product&product_id=52","imageUrl":"","description":"<p><br><\/p>"}]}]}