mongodb get all documents where field is greater than given value code example
Example: mongodb greater than field value
collection.find( { $expr: { $gt: [ "$field1" , "$field2" ] } } )
#field1 greater than field2
collection.find( { $expr: { $gt: [ "$field1" , "$field2" ] } } )
#field1 greater than field2