I have a collection with a document structure as this:
{_id:"XXXXXXXXX", contents:{...}, color:"red"}
I would like to get a random document with a specific color. For instance, a random document that's also "red".
How can I achieve this?
I have a collection with a document structure as this:
{_id:"XXXXXXXXX", contents:{...}, color:"red"}
I would like to get a random document with a specific color. For instance, a random document that's also "red".
How can I achieve this?