title: Accessing JSON Data NativeScript
body: <p>I'm a little new to NativeScript and JSON and I'm having a little trouble accessing the data in my JSON file. Right now I'm just trying to log some of the data out. </p>
  
  <p>Here is the code in my view-model:</p>
  
  <pre><code>var config = require("../../shared/config");
  var fetchModule = require("fetch");
  var ObservableArray = require("data/observable-array").ObservableArray;
  
  function StandingsListViewModel(items) {
  var viewModel = new ObservableArray(items);
  
  viewModel.load = function() {
      var url = config.apiURI + "getStandings.cfm?weekid=397";
      console.log(url);
      return fetch(url)
      .then(handleErrors)
      .then(function(response) {
          console.log(response.json());
          return response.json();
      })
      .then(function(data) {
          console.log("hit");
          data.Result.forEach(function(standing) {
              console.log(standing.place);
              console.log(standing.username);
          });
      });
  };
  
  return viewModel;
  }
  
  function handleErrors(response) {
  if (!response.ok) {
      console.log(JSON.stringify(response));
      throw Error(response.statusText);
  }
  return response;
  }
  
  module.exports = StandingsListViewModel;
  </code></pre>
  
  <p>And the JSON file that I'm referencing:</p>
  
  <pre><code>{
      "hiding": 0,
      "lastupdate": 1474481622,
      "refresh": 600,
      "showmax": 0,
      "showtie": 1,
  
      "displayColumns" : [
          "Points"
          ,"Wins"
          ,"TieDif"
  
      ],
      "users" : [
  
          {
              "memberid" : 910089, 
              "username" : "THE DAILY ROUTINE",
              "last_entry" : "1473446820", 
              "place" : "1",
              "record" : [
              "1.0"
              ,"1"
              ,"10.0"
  
              ]
          } , 
          {
              "memberid" : 2234158, 
              "username" : "MR. MANAGER",
              "last_entry" : "1473277680", 
              "place" : "2",
              "record" : [
              "1.0"
              ,"1"
              ,"26.0"
  
              ]
          } 
      ] 
  }
  </code></pre>
  
  <p>I know this is probably something very basic, any help appreciated.</p>