title: Collecting a value from JSON file with ember.js
body: <p>I am trying to pass a simple variable value into an HTML file using ember.js. My value is contained within a json file called value.json.</p>
  
  <p>My HTML code is as follows:</p>
  
  <pre><code> &lt;h1&gt;I won {{App.moneyvalue}} today!&lt;/h1&gt;
  </code></pre>
  
  <p>However when I pass the json call via ember, it think that the entire call is a variable:</p>
  
  <pre><code> App = Ember.Application.create({
     moneyvalue: function () {
       return $.getJSON( "js/value.json", function( data ) {
         return data.tot;
       });
     }
    }
  </code></pre>
  
  <p>And returns the following:</p>
  
  <p><strong><em>I won function () { return $.getJSON( "js/donors.json", function( data ) { return data.tot; }); } today!</em></strong></p>
  
  <p>As it seems to think that moneyvalue is a string variable as opposed to a value?</p>
  
  <p>The jSON file is superbasic</p>
  
  <pre><code>{
    "tot": 100
  }
  </code></pre>
  
  <p>Where is this going wrong?</p>