.update()
Updates the entries that match the provided filter with the provided callback. Updates all the entries if no filter is provided.
update(updateCallback, filter)
A new way of updating an entry's data from a collection was introduced in version 2.11.0.
Now, instead of using the Collection#update method, you can simply get or fetch the entry's data with Collection#get, Collection#fetch, Collection#getOrCreate or Collection#fetchOrCreate, update a property directly in the code and then use the new Data
#save
method.
See the examples below:
Last updated