title: Javascript / SAPUI5 : Binding a JSONArray to a ListItem
body: <p>i've a SAPUI5-App to view data from a DBMS:
  DMBS &lt;-> Java &lt;-> jsp -> ajax -> JSONModel &lt;-> SAPUI5
  I've a problem with a model with this structure:</p>
  
  <pre><code>[
    {
      "key1": "value_a",
      "key2": "value_b",
      "key3": "value_c",
    },
    {
      "key1": "value_d",
      "key2": "value_e",
      "key3": "value_f",
    },
  ...
  ]
  </code></pre>
  
  <p>This data are stored in a model defined in my manifest.json. 
  Now i want to show this data in a list. In my view i define a list in the createContent function and add it to my page.
  In the controller i try to bind the data to a listitem:</p>
  
  <pre><code>var oItemTemplate = new sap.m.InputListItem({
     label : "{Model&gt;}"
  }),
  oList.bindItems("Model&gt;/", oItemTemplate);
  </code></pre>
  
  <p>In this try there are the correct count of listitems corresponding the number of objects in my model. But in the list are only "Objects"</p>
  
  <p><a href="https://i.stack.imgur.com/vk4ca.png" rel="nofollow noreferrer">List</a></p>
  
  <p>My plan ist to show a merged text from one object in one listitem:</p>
  
  <ul>
  <li>Item 1 : "value_a value_b value_c" </li>
  <li>Item 2 : "value_d value_e value_d"</li>
  <li>...</li>
  </ul>
  
  <p>Now i use a formatter for the label. </p>
  
  <pre><code>label : {
      path : "Model&gt;/",
      formatter : function(data) {
  
          return data;
      }
  }
  </code></pre>
  
  <p>According to this code new the list shown still the correct number of items and each item contains all ojects</p>
  
  <p><a href="https://i.stack.imgur.com/BYDY5.png" rel="nofollow noreferrer">List with formatter</a></p>
  
  <p>But how i can access my object data key1, key2 and key3? All my trys are unsuccessful</p>
  
  <pre><code>console.log(data.key1) -&gt; undefined
  
  console.log(data/key1) -&gt; ReferenceError: key1 is not defined
  </code></pre>
  
  <p>Can anyone help me please?</p>
  
  <p>Regards</p>
  
  <p>MacLeod</p>
  
  <p>PS:
  If i use</p>
  
  <pre><code>var oItemTemplate = new sap.m.InputListItem({
      label : "{Model&gt;key1}"
  });
  oList.bindItems("Model&gt;/", oItemTemplate);
  </code></pre>
  
  <p>then value_a / value_d will be shown on the listitems.
  But i can't use this with the formatter</p>
  
  <p>In the formatter </p>
  
  <pre><code>formatter : function(data) {
  
     return data;
  }
  </code></pre>
  
  <p>the data-object contains the complete JSON data. But there is no automatic iteration like using normal binding </p>
  
  <pre><code>label : "{Model&gt;key1}"
  </code></pre>