title: AngularJS : Display a property value of multiple objects in an input text field, comma separated
body: <p>I have an array of JSON objects in the format</p>
  
  <p><code>users=[{id:'1',name:'ABC'},{id:'2',name:'DEF'},............]</code></p>
  
  <p>I need to display the names of all users in an <code>input text field</code> comma separated as below image.</p>
  
  <p><a href="https://i.stack.imgur.com/Yhuak.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yhuak.jpg" alt="enter image description here"></a></p>
  
  <p>I tried using <code>ng-list</code> directive, but for that I had to first loop through the <em>user</em> objects and store all the <em>names</em> in a separate array and use that array as <code>ng-model</code> for the <code>&lt;input&gt;</code> element. Is there an easy, alternate way in angularjs?</p>