Question over Json sorting
<blockquote>
  <p><a href="http://www.devcurry.com/2010/05/sorting-json-array.html" rel="nofollow">http://www.devcurry.com/2010/05/sorting-json-array.html</a></p>
</blockquote>

<p>I came across this article, i want few explantions over this article. </p>

<pre><code>    function SortByName(x,y) {      
        return ((x.Name == y.Name) ? 0 : ((x.Name &gt; y.Name) ? 1 : -1 ));   
    }

arr.sort(SortByName);
</code></pre>

<ol>
<li><p>What would be the arguements for arr.sort(x,y). What will be passed to the function from the JSON Object. </p></li>
<li><p>What does the SortByName function return. I don't understand the entire line. can anyone give me more details over this.</p></li>
</ol>
