I was trying to solve a query given in an assessment to fetch details from a collection. The assessment was in online editor so I had to follow the base query structure. MONGODB version 4.4
The base query was looking like below.
{
find : "MY_COLLECTION_1"
}
The collection name is "MY_COLLECTION_1", and there is field "FirstName" column in the collections like below.
{
{
"FirstName": "ABC"
}
{
"FirstName": "XYZ"
}
}
I have never seen the below format to fetch the data. Need help with this.
{
find : "MY_COLLECTION_1"
}
I tried to fetch something like below.
{
"find" : "MY_COLLECTION_1",
"FirstName" : "ABC"
}
but it's saying invalid BSON format