When I query documents in PyMongo, I will have some documents that have user specified data types (although optional) for some attributes e.g.
‘Age’: Decimal128(‘40.8’) --> Decimal128
‘JoinDate’: datetime.datetime(2020, 9, 11, 4, 0)
In the above example, I want to remove the ‘data type’ tags from the document e.g. ‘Decimal128’,‘datetime.datetime()’. For DateTime, perhaps I can use a default return a string but for other data types, how can I omit the data types? Is it possible via setting a property in PyMongo or do I need to use a regex and update the values?
Thanks much !.