MongoDB lexicographically sorts strings in UTF-8 and can use $gt ($greater than, greater than) and $lt ($less than, less than) for string queries
List all documents whose name field begins with D:
>db.people.find( { name: { $lt:"D" } } );
MongoDB lexicographically sorts strings in UTF-8 and can use $gt ($greater than, greater than) and $lt ($less than, less than) for string queries
List all documents whose name field begins with D:
>db.people.find( { name: { $lt:"D" } } );