skip to Main Content

MongoDB select best matched document

I have a collection of documents like this: [{ "_id" : ObjectId("6347e5aa0c009a37b81da700"), "testField1" : "1000", "testField2" : "2000", "testField3" : NumberInt(1) }, { "_id" : ObjectId("6347e5890c009a37b81da701"), "testField2" : 2000, "testField3" : NumberInt(2) }, { "_id" : ObjectId("6347e5960c009a37b81da702"), "testField3" : NumberInt(3)…

VIEW QUESTION

Mongodb aggregation to find outliers

In my mongodb collection documents are stored in the following format: { "_id" : ObjectId("62XXXXXX"), "res" : 12, ... } { "_id" : ObjectId("63XXXXXX"), "res" : 23, ... } { "_id" : ObjectId("64XXXXXX"), "res" : 78, ... } ... I…

VIEW QUESTION

Mongodb – How to remove double quotes inside double quotes in string field?

Currently a document looks like this: { "Post": "this is a post", "_id": ObjectId("630f3c32c1a580642a9ff4a0"), "iframe": ""https:/www.youtube.com/embed/RzVvThhjAKw"", "slug": "this-is-a-title", "title": "This is a title" } But I want it like this: { "Post": "this is a post", "_id": ObjectId("630f3c32c1a580642a9ff4a0"), "iframe": "https:/www.youtube.com/embed/RzVvThhjAKw",…

VIEW QUESTION
Back To Top
Search