My database contains records with a field that has different data types in each record. I would like to query only for the records where this field contains strings. Is there a way to search for specific data types in this field?
{"field1":ObjectId("53de"),"field2":string}
{"field1":string,"field2":string}
{"field1":NumberLong(123),"field2":string}
For example, I am looking for something similar to:
db.collection.find({field1:{$regex:"some string format"}})