Javascript Group Array Of Objects By Category