I've checked other related questions, in particular this one. But since that was answered it seems like rethink's handling of nested fields has changed.
I'm trying to modify the nested arrays 'amy' and 'joe':
{
"id": "blah" ,
"schedules": {
"amy": ['some', 'stuff', 'here'],
"joe": ['more', 'stuff', 'here']
}
}
I've tried all kinds of different approaches, but I can't get it to work in a single call to the database. Instead, I'm having to grab the existing array using one call:
r.table('whatevs').get('blah').pluck({schedules: {amy: true}})
this gives me something that looks like:
"schedules": {
"amy": ['some', 'stuff', 'here']
}
so I pull out schedules.amy and modify the array then...
r.table('whatevs').get('blah').update({schedules: {amy: [modified_array]}})...
What I'd like to do is modify the arrays in place with a single query using .difference() and .append(). It seems like this is now possible, but no matter what syntax I try it gets rejected.