Explanation of two different array formats
const arr1 = [
{
"elementName": "one"
},
{
"elementName": "two"
}
]
const arr2 = [
{
"type": "RPT_PROPERTY_DEMOGRP",
"values": [
{
"label": "HH"
},
{
"label": "HH1"
}
]
},
{
"type": "RPT_PROPERTY_PLAYBACK_TYPE",
"values": [
{
"label": "WW"
},
{
"label": "WW1"
}
]
}
]
I am looking to create combinations from these two arrays such as:
'one HH WW'
'one HH WW1'
'one HH1 WW'
'one HH1 WW1'
'two HH WW'
'two HH WW1'
'two HH1 WW'
'two HH1 WW1'
Any suggestions on how to implement this logic in JavaScript or TypeScript?