Shouldn't it be person.hobbies[0]?
Map is really cool though. This is really helping with my understanding.
It depends on what you are after. In the given example, I wanted to pull out the second item in the hobbies array from each person.
I'm glad I could help. When I first bumped into map it freaked me out quite a bit.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Shouldn't it be person.hobbies[0]?
Map is really cool though. This is really helping with my understanding.
It depends on what you are after. In the given example, I wanted to pull out the second item in the hobbies array from each person.
I'm glad I could help. When I first bumped into map it freaked me out quite a bit.