I am trying to figure out how to filter data in mongodb Atlas via API requests. My json structure:
{
_id: ObjectId,
level: number,
names: Array
}
I learned how to filter by _id
. I pass the id
via url, and fetch data with filter
parameter using $oid
in the body.
But the question is: how to filter data by level
and get the list of data assign to certain level
? I don't know what to use instead of $oid