rethinkdb / docs

RethinkDB documentation
http://rethinkdb.com/docs
Apache License 2.0
117 stars 167 forks source link

No documentation on how to update values in an array of subdocuments #1229

Closed codeliger closed 1 year ago

codeliger commented 5 years ago

No documentation on how to update values in an array of subdocuments

luke-robertson commented 5 years ago
r.table(...).get(...).update({
contacts: r.row('Contacts').changeAt(0,
  r.row('Contacts').nth(0).merge({feedback: "NICE"}))
 })

something like this ?

srh commented 5 years ago

You have to construct a new array -- you can't update individual values.