title: Horizon/Ionic2 return a value
body: <p>I want to return a value from Rethinkdb using Horizon: </p>
  
  <pre><code>ionViewLoaded() {
    let exampleValue;
    exampleValue = this.getValue();
  
    console.log(exampleValue); // gives me "undefined"
  }
  
  getValue() {
     let hz = new Horizon({host: "localhost:3100"});
     hz.connect();
     let table = hz('values');
  
     table.find(1).fetch().subscribe((val) =&gt; {
       return val;
     });
  }
  </code></pre>
  
  <p>I need this value outside function and then I want to write simple if/else statement (if I do this into query then I get weird error - view is reloading over 200 times...). Is there anyway to return this value? </p>