Im working with node.js and mongoose.
The task is as follows: I need to update the information in the database, provided that the required field in the database does not exist or its value is less than 'x'.
In more detail, this will be information about the players in the database, each of them will have a "Records" object in which there will be different fields. And I need to update the information of these fields, if the information received is greater than that which exists in the database.
How can i do it?
Thanks!