I have a web service that connects to mongodb, retrieves an object in JSON format for the user to edit, and then save any changes made back to the database. Now, I am looking to incorporate a "Save as" feature that would allow users to create a new object with their modifications instead of overwriting the existing one. However, when I attempt to make a POST request without changing the objectId, the updated object simply replaces the original one with the same ID.
Is there a way to dynamically assign a new objectId using JavaScript?
This implementation involves utilizing the MongoDB C# driver within a WCF service environment.