Javascript Array Of Objects Sort By Shape