I have an array of objects (police data, each one is a crime). The array of objects is 1000 in length.
Every object has a key/value such as community_area: 22
.
I am trying to iterate over the array of objects to find the top three community areas that exist in the array. So if community areas 22, 70 and 1 had the most crime (each object occurrence) it would return those three.
How could I go about doing this?
via QueSo
No comments:
Post a Comment