skip to Main Content

How to get expected output from MongoDB?

I'm new to MongoDB aggregation. I am not getting desired output The output I'm getting from aggregation:- [ {tweet:{key:value}}, {tweet:{key:value}}, {tweet:{key:value}}, {tweet:{key:value}}, ] but I want the following output from the pipeline:- [ {key:value}, {key:value}, {key:value}, ] and lastly, pipeline…

VIEW QUESTION

How to replace string in collection array with MongoDB 4.2

I have below Mongo Collection { "name":"test", "work":"BA", "contacts":[ { "company":"xyz", "email":"http://www.google.com/check/com/2" }, { "company":"xyz1", "email":"http://www.google.com/verify/com/4" } ] } I want to replace www.google.com from contacts email to www.test.com, Not complete URL only a particular string from email. Any help…

VIEW QUESTION
Back To Top
Search