title: Cloud function onUpdate is not working
body: <p>I am new to javascript and google cloud functions. I followed the documentation and still don't know why orderdata is returning undefined.</p>
  
  <pre><code>exports.updateordersumry = functions.database.ref('/Ordergroup/{pushId}/OrderSummry').onUpdate(event =&gt; {
  
              const orderdata = event.data.val();
              const isbuyercharged = orderdata.buyercharged
  })
  </code></pre>
  
  <p>orderdata is returning undefined, what am i doing wrongly?</p>