I am new to arangodb, i have the following document under collection named posts
{_id:56687, userid: "usr32", postcontent: "text here", comment: [{usrid:"usr32",msg:"good post",date:"date"},{usrid:"usr32",msg:"good post",date:"date"}] }
Basically this document corresponds to a facebook wall like post and will take multiple comments from various users. Can someone please help with aql query to push data into this array?
AQL should be able to identify the document based on _id field, which i was able to do with ease, the problem is pushing new comment into the array I use nodejs
found a solution, donno if there is a better one
for p in posts filter p._key=='56687' let arr = push(p.comment,'nice video') update p with {comment: arr} in posts