title: How to Retrieve individual JSON values from Firebase Database?
body: <p>Let's say I have a firebase node that is dbref = firebase.ref('/Transfer_Request/{pushID]/').</p>
  
  <p>And the client writes two values; from_ID and to_ID to dbref. How do I get the individual values of the from_ID and to_ID from Firebase Cloud functions?</p>
  
  <p><a href="https://i.stack.imgur.com/kYiD4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kYiD4.png" alt="My database"></a></p>
  
  <p>My code:</p>
  
  <pre><code>exports.TransferTicket = functions.database.ref('/Transfer_Request/{pushID}').onWrite((event) =&gt; {
  
    const original = event.data.val();
    const from_ID = original.from_ID;
    const to_email_ID = original.to_ID;
  
    //search for to_email ID
    return admin.database().set("A transfer request was just made");
  
  });
  </code></pre>
  
  <p>I'm getting two errors:</p>
  
  <p>1)  </p>
  
  <blockquote>
    <p>TypeError: admin.database(...).set is not a function at
    exports.TransferTicket.functions.database.ref.onWrite
    (/user_code/index.js:41:25) at Object.
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:59:27)
    at next (native) at
    /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71
    at __awaiter
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:24:12)
    at cloudFunction
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:53:36)
    at /var/tmp/worker/worker.js:716:24 at process._tickDomainCallback
    (internal/process/next_tick.js:135:7)</p>
  </blockquote>
  
  <p>2)  </p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'from' of null at
    exports.TransferTicket.functions.database.ref.onWrite
    (/user_code/index.js:35:25) at Object.
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:59:27)
    at next (native) at
    /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71
    at __awaiter
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:24:12)
    at cloudFunction
    (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:53:36)
    at /var/tmp/worker/worker.js:716:24 at process._tickDomainCallback
    (internal/process/next_tick.js:135:7)</p>
  </blockquote>