i need to delete the url from the below mongodb database with the id which is in url object, then need the remaining data's as a result
My mongodb collection has the following :
{
"_id" : ObjectId("589b043abc2f5a467c13303b"),
"user_id" : ObjectId("5874c174c813822341cb59a7"),
"filename" : [
{
"url" : "images/product_images/file-1486554170465.jpeg",
"_id" : ObjectId("589b043abc2f5a467c13303c")
},
{
"url" : "images/product_images/file-1486554306440.jpeg",
"_id" : ObjectId("589b04c2bc2f5a467c13303f")
}]
}
Can anybody help me please , thanks in advance ..
select(['field1', 'field2'])from Mongoose. Or you can do some post-processing with_.pick()or_.omit()from the Lodash library.