Converts json for import into mongodb