title: How to bind an array to a ListView
body: <p>I know how to parse with Json and bind a file like this to a listview:</p>
  
  <pre><code>[
  {
      "key": "Arthur Schopenhauer",
      "numeroFrasi": 3,
      "foto" : "images/TEST.jpg",
  },
  {
      "key": "Nietzsche",
      "numeroFrasi": 1,
      "foto" : "images/TEST.jpg",
  },
  .........
  </code></pre>
  
  <p>But I can't understand nor find on Web how to bind just every "frasi" (that is an array) in a file like this:</p>
  
  <pre><code>[
  {
      "key": "Arthur Schopenhauer",
      "numeroFrasi": 3,
      "foto" : "images/TEST.jpg",
      "frasi": [
          "Fras1",
          "Frase 2 schopenahuer",
          "Frase 3 schopenhahuer"
      ]
  },
  {
      "key": "Nietzsche",
      "numeroFrasi": 1,
      "foto" : "images/TEST.jpg",
      "frasi": [
          "Frase 2 nietzsche",
          "Frase 3 nietzsche"
      ]
  },
  ...............
  </code></pre>
  
  <p>My Object isn't an array, but it is definied like this form a txt file parsed with Json:</p>
  
  <p>This is the generic definition:</p>
  
  <pre><code> (function () {
  "use strict";
  
  var list = new WinJS.Binding.List();
  var groupedItems = list.createGrouped(
      function groupKeySelector(item) { return item.group.key; },
      function groupDataSelector(item) { return item.group; }
  );
  
  
  WinJS.xhr({ url: "/data/frasi.txt" }).then(function (xhr) {
      var items = JSON.parse(xhr.responseText);
  
      // Add the items to the WinJS.Binding.List
      items.forEach(function (item) {
          list.push(item);
      });
  });
  </code></pre>
  
  <p>Then this is the specific definition (because when I navigate to my page, I select just an "item", so only one "key, "numeriFrasi", "foto", "frasi":</p>
  
  <pre><code> WinJS.UI.Pages.define("/pages/itemDetail/itemDetail.html", {
  
      ready: function (element, options) {
          item = options &amp;&amp; options.item ? Data.resolveItemReference(options.item) : Data.items.getAt(0);
  </code></pre>
  
  <p>"resolveItemReference" gets one item from all the items created</p>