I got an array of JSON object in express backend like this, which each object contains an array, the key is the same called projectTags:
[ { projectTags: [ 'rer' ] },
{ projectTags: [ 'a10' ] },
{ projectTags: [ 'a10', 'c12', 'e14' ] },
{ projectTags: [ 'a10', 'e14', 'b11', 'c12', 'd13' ] } ]
And I want to merge these arrays together, which the result won't have the same tag too. So ideally it will look like this:
[ { projectTags: [ 'rer', 'a10', 'c12', 'e14', 'b11', 'd13' ] },]
So how should I do to achieve this?