check for duplicate object in array javascript