The Appery.io Database runs on MongoDB database. The following screen shot shows a sample collection (table) with employees in the database.

You want to update two or more objects in a single request. That’s very simple to do from Appery.io Server Code. The following server script does multi-object update, it just one line of code:
var result = Collection.multiUpdateObject("367e9e77-cc1f-4c1f...", "People", '{"title":"Engineer"}', {"title":"Senior Engineer"});
- The first argument is the database API key.
- People is the collection name inside the database.
- With {“title”:”Engineer”} you are searching for all records where the title is set to “Engineer” and update those objects to a title of “Senior Engineer“.
- Collection is part of Server Code API that integrates with the database.
That’s it.
After you run the script, the database collection looks like this:

Appery.io Server Code provides a very nice integration with the Database that allows you to run and execute advanced app logic.
Learn more about Appery.io Database and Server Code from many short videos on our YouTube channel.
Leave a Reply