Is it possible to do a comparison (e.g. greater than, ">") between two properties in a MongoDB document?
For example, if I had a document:
{
"t" : [100, 200]
}
Is it possible to do something like this to find documents with the first item in "t" to be less than the second item in "t"?
db.item.find( {"t.0": {$lte: "t.1"} } );
I realize I can first query all relevant documents first and then do my filtering after in my app, but wanted to see if there's a native way in MongoDB to do this.
Appreciate your help, Josh