If I have an array (category) that have multiple of the same values (retail for example)
How do I remove duplicates and just return just one (Retail, Technology, Auto etc)
So it just leaves data like this:
Before:
category: “Retail, Retail, Retail, Technology”,
After:
category: “Retail, Technology”
I have a code example here:
https://codesandbox.io/s/late-cdn-2stdj
Update:
See when I do it with const of categories it works:
https://codesandbox.io/s/inspiring-sky-zx4mo
but when I try and do it with a .map to access the array it doesn't that is where I am at: