Using $push in MLAB's MongoDB REST API
问题 I am using NodeJS to write a post query to insert an object in array through the MLAB REST API but I am getting error in making the API call. The Json Object is like : { ..... "someattriute" : "somevalue", "attributenew" : [ {"a":"a1","b":"b1"} ], ..... }, { .... } The NodeJS API call is like : request.post('https://api.mlab.com/api/1/databases/cabchain/collections/rides?q={"someattribute": "'+"somevalue"+'"}&apiKey=....', { json: { "$push": {"attributenew": {"a": "a2", "b": "b2"}} } },