Failed to import a mongodb database with duplicate fields
I have successfully upgraded a database from 2.4 to 4.0 using the following 3 step method:


use 2.4 mongobackup on the 2.4 database
delete all .json files from the outputted dump directory
use 4.0 mongorestore on the remaining .bson files