Within my JSON object array, the structure is as follows:
users=[{id:'1',name:'ABC'},{id:'2',name:'DEF'},............]
To present the names of all users in a single input text field
separated by commas, I am aiming for an outcome similar to the image below.
https://i.sstatic.net/Yhuak.jpg
I attempted utilizing the ng-list
directive. However, this necessitated individually iterating through each user object, extracting and storing their names in a distinct array, which would subsequently serve as the ng-model
for the <input>
element. Are there any simpler or alternative approaches within angularjs?