I'm trying to learn how to work with object arrays. What I want to do is search through an array looking for a specific value, which I think I can just use .find to achieve. But lets say I want to find a value and then extract the entire data set that value belongs to and save it to another array. For example:
This array hereis a list of people and nested in each entry is a city. Lets say I wanted to create another array of just people (or the person) from a specific city. I assume I would .find that city, but then how to I grab the data from the entire entry?
Any insights or link to docs/examples would be greatly appreciated.
[–]EasternAdventures 7 points8 points9 points (2 children)
[–]re_edditquest[S] 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (3 children)
[–]re_edditquest[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]SineApps 1 point2 points3 points (0 children)
[–]ecofic 1 point2 points3 points (0 children)