Add another object from a file to a Javascript Object Array -
im trying build cart functionality user add single product array of products or objects. var product = { "name": "bike", "price": "900", "idproduct": "1" }; now store product in plain json text.stringify function that. var jsonstring = json.stringify(product); now take jsonstring , convert object or object array so. var jsonobjectarray = json.parse(jsonstring); now im going create new same json object type diff values. var product2 = { "name": "car", "price": "12000", "idproduct": "2" }; it seems jsonobjectarray doesnt have push method because got deserialized single object namely product1, should can add product2 jsonobjectarray member of aray , repeat process multiple times. jsonobjectarr