I have a hash H which should contain various users as json. "users" list contains all users and every user object contains various user's details like name, age etc. I don't want to iterate over every user in the list and do user.as_json
and then merge into the hash.
Is there a single line query which does this?