title: How to assign a variable using firebase javascript
body: <p>Reading the firebase doc this line:</p>
  
  <pre><code>database.ref('/').once('value').then(function(snapshot)
  </code></pre>
  
  <p>That is from a paragraph titled "Read data once" which I'm assuming reads in all the data from the database.</p>
  
  <p>I'm just struggling to figure out how to assign data from the object that is returned to a variable in javascript. </p>
  
  <p>What I want to do is populate a dropdown list with place names.</p>
  
  <p>For instance if I have a field called Location in the db containing place names eg Sydney, Melbourne, Brisbane how would I get the data from the returned object and assign it a variable called place so I can then use the place variable to populate the html dropdown list.</p>