completed first version of row deduplication for joining multiple related rows of data within an array of the original row