Add a function to replace dots in MongoDB keys