add helper to remove duplicates from object arrays