title: firebase multi path update
body: <p>I am trying to update 2 seperate firebase location 1. is a list of patients and 2. is a list of evaluation for that patient. I created a lookup that list all the evaluation for that patient </p>
  
  <p><img src="https://i.stack.imgur.com/rnvfP.png" alt="enter image description here"></p>
  
  <p>I have been using the code below to loop with the evaluation keys, however only the patients location is updating. Please help. </p>
  
  <pre><code>function updateLabel ({rootRef, uid, label}){
    var lookupRef = rootRef.child('evaluation_lookup/22')
    return lookupRef.once('value'). then(snap =&gt; {
      var evalKeys = Object.keys(snap.val())
      var updateObj = {}
      for (var i=0; i &lt; evalKeys.length; i++) {
        var keys = evalKeys[i]
        updateObj['evaluation/22/keys/label'] = label
      }
      updateObj['patient/22/label'] = label
      return rootRef.update(updateObj)
    })
  }
  updateLabel ({
    rootRef: firebase.database().ref(),
    uid: '22',
    label: 'yetunde'
  }).then(_=&gt; {
    console.log('complete!')
  }).catch(err =&gt; {
    console.error(err)
  })
  </code></pre>