Reputation: 7079
I have a array of objects. When I print it, it looks like :
[com.groups.bean.User@5a2045, com.groups.bean.User@fcabd6, com.groups.bean.User@758cdb]
I want array of values of its property "Name" like :
[John,Mike,Peter]
I know, I can iterate through the array and call property "Name" of each object and put it in a new array.
But I want to avoid looping. Is there any shortcut for it ?
Upvotes: 0
Views: 75