The Mongo database is set up with a sharding structure of 3 Shards named TestSharding. Additionally, the script for this configuration can be written in JavaScript.
I am tasked with developing a program that identifies whether a file is in .json or .csv format and then imports it into the Mongo database. However, I am unsure of how to approach this task. Can anyone offer me some guidance?