title: Display unique values in a sap.m.List
body: <p>I'm trying to display only unique values in a List. The values are loaded from the following JSON Model and I need to populate the List with all unique names:</p>
  
  <pre class="lang-json prettyprint-override"><code>{"Customers": [
  {"name": "Customer A","age": "30"},
  {"name": "Customer B","age": "25"},
  ...
  ]}
  </code></pre>
  
  <p>While searching for a possible solution i ran into the sap.m.ListBinding class and its function <code>getDistinctValues(sPath)</code> >> <a href="https://sapui5.hana.ondemand.com/sdk/#docs/api/symbols/sap.ui.model.ListBinding.html" rel="nofollow noreferrer">see API</a></p>
  
  <p>This function should be returning an array of distinct values from a given relative Path. I've tried using the function in the following manner:</p>
  
  <pre class="lang-js prettyprint-override"><code>var oModel = this.getView().getModel("customers"),
  oListBinding = new ListBinding(oModel, "customers&gt;Customers", oModel.getContext("/Customers")),
  arrValues = oListBinding.getDistinctValues("name");
  </code></pre>
  
  <p>But i keep getting <code>arrValues=null</code>. Any ideas to what I'm doing wrong here?
  I've also tried using <code>customers&gt;name</code>, <code>customers&gt;/name</code> and <code>/name</code> without any luck.</p>