I have below javascript array of object problem in which i have tag array property inside array of object. Tag array contain some value in each array of object. I wanted to get unique tag value from each array of object and combine into single array which will contain only unique tag.
const obj = [{
name: "ABC",
tag: ["abc", "xyz"]
}, {
name: "USA",
tag: ["abc", "suv"]
}, {
name: "ABC",
tag: ["pot", "xyz"]
}]
I need the unique tag item into single array as per below.
const unique = ["abc", "xyz", "suv", "pot"];