I have an array with below values.
const array1 = [
{ id: "1111" },
{ id: "2222" },
{ id: "3333"},
{ id: "4444"},
{ id: "5555"}
];
Suppose I want to add {“id” : “1111”} once again or any other duplicate {key:value} pair, then how to prevent it from adding in the array ?
Please help on this.