I got a issue I would like feedback on how it can be solved.
Here's my JSON:
questions: [
{
question: 'lala',
answer: 'papa',
categories: ['Handla']
},
{
question: 'xxxx',
answer: 'yyyy',
categories: ['Reklamation']
},
{
question: 'abcefg',
answer: 'gooooogle',
categories: ['Reklamation']
}
]
I want to iterate over this question array and append the ALL the object.categories to a new array and then filtering out the duplicated ones. So basically my response should be:
["Handla", "Reklamation"]