I’m working on the nightlife coordination app and I can’t seem to update an array of objects. I want to update some properties on a particular object and then save it, but when I check the database, it doesn’t show that it has been updated.
Here is my model, and my server code:
The database query is at the very end of the server code. I did business.save() before but it threw an error saying that I can’t use the save function with $elemMatch, and to use “Model.update()” instead. I’ve reached a very tough obstacle, and have been trying to solve this issue all day. If someone can help, I would greatly appreciate it.