Supported platforms: Mini Program 2.8.3, Cloud Function 1.2.1, Web
Array update operator. Given a value or a query condition, it removes all elements in the array that match the given value. The difference from pull is that it can only specify constant values, and an array is passed in.
Parameters
value: any
The value or query condition
Return Value
Command
Example Code: Remove Based on Constant Matching
Remove all "database" and "cloud" strings from tags
const _ = db.command
db.collection('todos').doc('doc-id').update({
data: {
tags: _.pullAll(['database', 'cloud'])
}
})