I have a array of objects, like:
[{
actionType: 10,
orderItemId: "3205ae52-ab00-4823-a004-da0cda639065",
productComponentAction:{
productComponent:{
offerId: 10002839,
parentOfferId: 10003058,
adoptableProdCompId: undefined
}
}
},
{
actionType: 10,
orderItemId: "3205ae52-ab00-4823-2121-da0cda6390ae",
productComponentAction:{
productComponent:{
offerId: 10002839,
parentOfferId: 10003058,
adoptableProdCompId: undefined
}
}
}]
I want this array to be unique on the basis of offerId. If offerId is the same, then I want to remove that object from the array.