Work out most popular and least popular in an array of objects
<p>I have a array of objects - something like this: </p>

<pre><code>[
  {"name" : "blar", "percentageTotal" : "10", "mostPopular" : "false", "leastPopular" : "false"}, 
  {"name" : "foo", "percentageTotal" : "40", "mostPopular" : "false", "leastPopular" : "false"}, 
  {"name" : "bar", "percentageTotal" : "50", "mostPopular" : "false", "leastPopular" : "false"}
]
</code></pre>

<p>What would the best way to iterate over the objects and update the "mostPopular" and "leastPopular" properties, based on the "percentageTotal" property?</p>
