<?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"
	>
<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>'My humble abode'.sub(/ab/,'c')</description>
	<pubDate>Fri, 21 Nov 2008 19:43:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: joe</title>
		<link>http://blog.bogojoker.com/2008/06/javascript-sort-an-array-of-objects/#comment-53</link>
		<dc:creator>joe</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're right.  I expected it to sort based on true or false but I just re-read w3school's definition which I scanned over and it says: "you must create a function that compares numbers".

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'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-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's sort works a little differently than you expected

var obj_arr = [ { age: 21, name: "Larry" },
                { age: 34, name: "Curly" },
                { age: 10, name: "Moe" } ];

obj_arr.sort( function(a,b) {
  return a.name &#60; b.name ? -1 :
         a.name &#62; 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>
