given sample data like:
{
'id': 1,
'things': [{'name': 'a'},{'name': 'b'},{'name': 'c'}]
}
how do I update the document removing the array item with name of 'b' from the embedded array?
r.table('test')
.get(1)
.update({things: r.row('things')????});
You can use the
updatecommand along withfilterto filter the elements in an array and pass to along toupdate.Basically, you'll be overwriting
thingswith the filtered array.