title: UI5 Data Binding from an Array of Objects (JS View)
body: <p>I am trying to bind Data to my table .</p>
  
  <p>My Data looks like this :<a href="https://i.stack.imgur.com/ycaJr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ycaJr.png" alt="enter image description here"></a></p>
  
  <p>And relevant parts of my Code : </p>
  
  <p>from View : </p>
  
  <pre><code>var innerTable2 = new sap.m.Table(this.createId("innerTable2"), {
          columns: [
              new sap.m.Column({
                  header: new sap.m.Label({
                      text: " Header Text"
                  })
              }),
              new sap.m.Column({
                  header: new sap.m.Label({
                      text: " Header Text 2"
                  })
              })
          ]
      }).addStyleClass("table-result");
  </code></pre>
  
  <p>from Controller : </p>
  
  <pre><code>// creating path for the property I need
  var path_STOFFTYP = "{" + elementId + "/stoff/STOFFTYP}";
  var oInnerTemplate2 = new sap.m.ColumnListItem({
      cells: [
          new sap.m.Text({
              text: "test"
          }),
          new sap.m.Text({
              text: path_STOFFTYP
          })
      ]
  });
  //here binding template to table 
  this.byId("innerTable2").setModel(oModel).bindItems("/results/rs999", oInnerTemplate2);
  </code></pre>
  
  <p>If I leave   the <code>path_STOFFTYP</code> as it is now, I don't recieve any data.</p>
  
  <p>If I make it  only "stoff" it shows <code>[object Object]</code>  as much as the length of <code>stoff</code> array.</p>
  
  <p>What I know, for sure is , the property  "stoff" has at least 1 and maximum 65 different  elements ( depends to the selected  item. its dynamic) </p>
  
  <p>If I change the   var <code>path_STOFFTYP</code> to <code>"{" + elementId + "/stoff/0/STOFFTYP}";</code></p>
  
  <p>It shows the value of "Wirkstoff". Which is  correct, however I don't want to create 60 different properties.</p>
  
  <p>My Question : How can I manage to get all values of the property "STOFFTYP" from the array "stoff"  ?  I want to bind it dynamically.</p>