RethinkDB - Updating nested array

后端 未结 6 2324
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 02:09

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:25

    it works for me

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

提交回复
热议问题