Sorting Program In Javascript Object Syntax