Javacript sort array of object : http://stackoverflow.com/a/979325 demo : http://jsfiddle.net/dFNva/101/