<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JavaScript Sort an Array of Objects</title>
	<atom:link href="http://blog.bogojoker.com/2008/06/javascript-sort-an-array-of-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bogojoker.com/2008/06/javascript-sort-an-array-of-objects/</link>
	<description>&#039;My humble abode&#039;.sub(/ab/,&#039;c&#039;)</description>
	<lastBuildDate>Wed, 28 Sep 2011 09:09:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Joseph Pecoraro</title>
		<link>http://blog.bogojoker.com/2008/06/javascript-sort-an-array-of-objects/comment-page-1/#comment-53</link>
		<dc:creator>Joseph Pecoraro</dc:creator>
		<pubDate>Sun, 15 Jun 2008 06:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://bogojoker.com/blog/?p=52#comment-53</guid>
		<description>@Peter: You&#039;re right.  I expected it to sort based on true or false but I just re-read w3school&#039;s definition which I scanned over and it says: &quot;you must create a function that compares numbers&quot;.

You bring up a good point and I bet that a benchmark of yours will blow mine out of the water.  Its just a tad too late for me to check it out now.  I&#039;ll take a look later and update the post.  Thanks for point that out!</description>
		<content:encoded><![CDATA[<p>@Peter: You&#8217;re right.  I expected it to sort based on true or false but I just re-read w3school&#8217;s definition which I scanned over and it says: &#8220;you must create a function that compares numbers&#8221;.</p>
<p>You bring up a good point and I bet that a benchmark of yours will blow mine out of the water.  Its just a tad too late for me to check it out now.  I&#8217;ll take a look later and update the post.  Thanks for point that out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Michaux</title>
		<link>http://blog.bogojoker.com/2008/06/javascript-sort-an-array-of-objects/comment-page-1/#comment-52</link>
		<dc:creator>Peter Michaux</dc:creator>
		<pubDate>Sun, 15 Jun 2008 06:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://bogojoker.com/blog/?p=52#comment-52</guid>
		<description>JavaScript&#039;s sort works a little differently than you expected

var obj_arr = [ { age: 21, name: &quot;Larry&quot; },
                { age: 34, name: &quot;Curly&quot; },
                { age: 10, name: &quot;Moe&quot; } ];

obj_arr.sort( function(a,b) {
  return a.name &lt; b.name ? -1 :
         a.name &gt; b.name ?  1 : 0; });</description>
		<content:encoded><![CDATA[<p>JavaScript&#8217;s sort works a little differently than you expected</p>
<p>var obj_arr = [ { age: 21, name: "Larry" },<br />
                { age: 34, name: "Curly" },<br />
                { age: 10, name: "Moe" } ];</p>
<p>obj_arr.sort( function(a,b) {<br />
  return a.name &lt; b.name ? -1 :<br />
         a.name &gt; b.name ?  1 : 0; });</p>
]]></content:encoded>
	</item>
</channel>
</rss>

