I am dealing with some very large third party CSV files which I import in Mongo. The issue is that the headers on these files are very inconsistent. Some files contain all lowercase, some mixed case and some all uppercase headers. After the file is imported, is there a way to query a collection case insensitively?
In short can I do:
@collection.find('AB' => value) so that it's true for fields 'ab' or aB' as well?
Is there a way to normalize these headers at the time of import? or may be there's another way?
The question suggested as a duplicate is for regex searches on values and not the field itself