title: Read Sibling Data of a particular node using Firebase Cloud Functions
body: <p>I'm using Firebase realtime database and  Firebase cloud functions(in Typescript).
  Below is the structure of my database nodes:</p>
  <p>Orders Node:</p>
  <pre><code>orders
  |- {Push ID}
      |--billing_id
      |--orders_id
      
  </code></pre>
  <p>Shippings Node:</p>
  <pre><code>shippings
  |- {Push ID}
      |-- billing_id
      |-- user_id
  </code></pre>
  <p>My function observes changes on the &quot;orders&quot; node and fetches the value of the &quot;billing_id&quot;.</p>
  <blockquote>
  <p>Note: This billing_id is the same billing_id that is stored in a
  &quot;shippings&quot; node. This billing_id will always be present in the &quot;shippings&quot; node.</p>
  </blockquote>
  <p>In the next step I want to target the shippings node containing the exact billing_id and fetch the user_id.
  Below is the code(shortest version):</p>
  <pre><code>export const orderEmail = functions.database.ref('/orders/{pushId}')
  .onCreate((snapshot,context)=&gt;{
      const original = snapshot.val(); //Stores values from the newly created orders node
      const billing_id = original.billing_id; // Stores the billing_id from the newly created orders node
  
  //Need help from here.
      var db = admin.database();
      var val1:any;
      db.ref(`/shippings/{pushId}/${billing_id}`).once(&quot;value&quot;) //Next what do I need to do?
  });
  </code></pre>
  <p><strong>Edit 1:</strong></p>
  <p>Tried the solution suggested by Neelavar. Below are the warnings and errors that I'm getting while deploying the function.</p>
  <pre><code>WARNING: A:/HN/functions/src/index.ts:79:9 - Forbidden 'var' keyword, use 'let' or 'const' instead
  WARNING: A:/HN/functions/src/index.ts:79:13 - Identifier 'db' is never reassigned; use 'const' instead of 'var'.
  ERROR: A:/HN/functions/src/index.ts:86:24 - Shadowed name: 'snapshot'
  WARNING: A:/HN/functions/src/index.ts:149:9 - Forbidden 'var' keyword, use 'let' or 'const' instead
  WARNING: A:/HN/functions/src/index.ts:149:13 - Identifier 'options' is never reassigned; use 'const' instead of 'var'.
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 2
  npm ERR! functions@ lint: `tslint --project tsconfig.json`
  npm ERR! Exit status 2
  npm ERR!
  npm ERR! Failed at the functions@ lint script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\RIYASREE'S_PC\AppData\Roaming\npm-cache\_logs\2020-10-15T14_18_07_047Z-debug.log
  
  Error: functions predeploy error: Command terminated with non-zero exit code2 
  </code></pre>
  <blockquote>
  <p>NOTE: Please let me know if any other info is needed.
  Also, please provide a detailed solution for this as I am new to both Firebase and Typescript.</p>
  </blockquote>