I'm trying to create a form that contains an object of arrays. I'm getting the error Encountered two children with the same key,1:$[object Object].. How do I create a unique key?
renderPositions() {
const profileCandidateCollection = this.props.profileCandidate;
const careerHistoryPositions = profileCandidateCollection && profileCandidateCollection.careerHistoryPositions;
if (careerHistoryPositions) {
return careerHistoryPositions.map((key, position) => {
return (
<CareerHistoryPositionsUpdateForm
key={key}
company={position.company}
title={position.title}
/>
)
})
}
}