I was wondering if there was a shortcut to do that with Kotlin:
val userNames = ArrayList<String>()
for (user in users)
userNames.add(user.name)
return userNames
That would be great if there was a one-line way to do this. Am I dreaming?
Thank you