Js Array Sort Objects By Attributes