Query Commands

Sort documents by newest to oldest use this in the "Sort" query

{ _id: -1}

filter documents with field match -> in Filter type

{ "FieldName" : "Field criteria" }

Query filter with docs over than date

{"_header.createdOn":{$gte:ISODate('2024-05-23T06:20:15.336+00:00')}}

Query filter with field type not number

{ 'Fieldname' : { $not : { $type : 'number' }} }

Last updated