title: AngularFire get and set a single value from/to a firebase database
body: <p>My firebase database is called verhuurfietsen and I have a maximum amount of 4 which I want to get and set but still the maximum has to be 4.</p>
  
  <p><a href="https://i.stack.imgur.com/50udd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/50udd.png" alt="firebase"></a></p>
  
  <pre><code> obj;
   constructor(private db: AngularFireDatabase){}
   ngOnInit() {
    this.obj = this.db.database.ref('amount');
   }
  
   updateMaxValue(){
    this.obj.update(this.max)
   }
  </code></pre>
  
  <p>pushing is not an issue but I can't seem to find anywhere how you get a single value out of a firebase database. I want to initialise my <code>max</code> variable with the valure from the firebase db</p>