Javacript sort array of object : http://stackoverflow.com/a/979325