Javascript find duplicate objects in array