Eliminate trailing commas from mongoDB jsons