RethinkDB - Updating nested array

后端 未结 6 1346
深忆病人
深忆病人 2021-02-13 01:42

I have a survey table that looks like so:

{
  id: Id,
  date: Date,
  clients: [{
    client_id: Id,
    contacts: [{
      contact_id: Id,
      score: Number,
         


        
6条回答
  •  离开以前
    2021-02-13 02:27

    it works for me

    r.table(...).get(...).update({
    contacts: r.row('Contacts').changeAt(0,
      r.row('Contacts').nth(0).merge({feedback: "NICE"}))
     })
    

提交回复
热议问题