title: How to create elements on the page from JSON array in NativeScript?
body: <p>I'm trying to find a way to create elements from JSON array in a nativescript page.</p>
  
  <p>to give you an example:</p>
  
  <p>in simple javascript/jquery, you could simply read JSON data and turn the data into HTML elements on your page. </p>
  
  <p>But this is not really as simple in nativescript. in fact, nothing seems to be simple in nativescript as the developers made it sound to be on their official website. <code>The Doc is so badly written as if they only wrote it for themselves to understand</code>!</p>
  
  <p>is there any staright forward way of achieving this?</p>
  
  <p>I'm using Javascript and Nativescript sidekick.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>To avoid confusion, I'm gonna explain a simple scenario:</p>
  
  <p>lets say I have an external PHP file that outputs this JSON:</p>
  
  <pre><code>[{
      "ID": "1",
      "name": "John",
      "age": 30,
      "city": "New York"
  }, {
      "ID": "2",
      "name": "Dave",
      "age": 20,
      "city": "London"
  }]
  </code></pre>
  
  <p>Now I need to know a way to read this in Nativescript and then create elements inside the app.</p>
  
  <p>by elements I mean the usual stuff that user click/tap on etc.</p>
  
  <p>I hope its clear now.</p>