So let's say I have 2 arrays
keyword = ['test','123']
lang = ['en','fr']
From these two, I want to create an object from keyword
that contains each lang
. Like below
keywords = [
{
keyword: "test",
lang: "en",
},
{
keyword: "test",
lang: "fr",
},
{
keyword: "123",
lang: "en",
},
{
keyword: "123",
lang: "fr",
},
];
So in total I'll have 4 objects cause each keyword will have their own lang. I've tried mapping but it's just not possible once I have 1 keyword and 2 languages.