I need help to make a update
in a particular record. Below is the document I want to change.
{
"_id":"ddc07497-003d-3dff-8f82-24b9b980a568",
"date":"2018-04-19T17:14:29.699Z",
"messages":[
{
"intents":[
],
"entities":[
],
"input":{
"text":"attachments",
"date":"2018-04-19T17:14:44.699Z",
"user":{
},
"payload":{
"watsonOnly":"attachments"
},
"files":[
{
"name":"Screen Shot 2018-04-05 at 09.00.15.png",
"url":"http://localhost:3000//uploads/5a8704792db4cf0a896ca668/files/35bd963d-4477-4817-8d29-3b234202978a.png"
}
]
},
"output":{
"text":[
"Você pode reformular sua afirmação? Eu não estou entendendo."
],
"nodes_visited":[
"Em outros casos"
],
"log_messages":[
],
"date":"2018-04-19T17:14:45.125Z",
"user":{
"id":"a079d4be-5190-ebe6-c55f-623aab50a665",
"name":"Robo do xande",
"avatar":"http://localhost:3000/uploads/5a8704792db4cf0a896ca668/avatar/e332048b-e7dd-45be-a6df-59b4a57545f8.jpeg"
}
}
}
],
"sizeOfmessages":2}
I need to find the document with the same _id
and then with the same url
that is inside input.files
, and when finding, make an update and set the url
to empty.
Could anyone help me?