title: Getting Uncaught Error: Reference.set failed: First argument contains undefined in property when trying to save the data to firebase storage
body: <p>I have an input field which on entering the input and clicking the save button, the data should be saved in the firebase storage.
  The code is as below,</p>
  <pre><code>&lt;div class=&quot;md-form&quot;&gt;
    &lt;input type=&quot;number&quot; id=&quot;ip1&quot; class=&quot;form-control&quot;&gt;
    &lt;label for=&quot;ip1&quot;&gt;ip1&lt;/label&gt;
  &lt;/div&gt;
  &lt;button type=&quot;button&quot; id=&quot;ip1_btn&quot; class=&quot;btn btn-dark-green&quot;&gt;SAVE&lt;/button&gt;
  </code></pre>
  <p>Below is what I am trying to achieve using js,</p>
  <pre><code>var rootRef = firebase.database().ref().child('demo-260b2');
  
      $('#ip1_btn').click(function(){
          rootRef.set({
              ip1:$('ip1').val()
              });
      })
  </code></pre>
  <p>While trying on the browser, I am getting the following error,</p>
  <blockquote>
  <p>Uncaught Error: Reference.set failed: First argument contains undefined in property 'demo-260b2.ip1'</p>
  </blockquote>
  <p>I am unable to figure out what's wrong in this. Any help would be very much helpful.</p>