Economical Way to Filter an Object's Results
<p>I have a JSON file and I need to retrieve only the items with the ten highest scores:</p>

<p>My data:</p>

<pre><code>{
    "movies" : {
        "eraserhead" : {
               "full_title" : "Eraserhead",
               "votes": 50
         },
        "psycho" : {
               "full_title" : "Psycho",
               "votes" : 90  
         }
    }
}
</code></pre>

<p>etc, etc for a list of about 50 - 100.</p>

<p>I know I can iterate through and build a list, but I was curious if there's any less processor-intensive way to filter these results based on that property (<code>movies[title].votes</code>).</p>

<p>Any help would be greatly appreciated, thank you.</p>
