I receive a JSON payload where two columns contains array of values. We want to split the the array column into multiple rows.
Sample Input:
[
{
"firstName": "John",
"surname": "Smith",
"primarySkills": [
"presentation",
"developer"
],
"secondarySkills": [
"abc",
"xyz"
],
"email": "[email protected]",
"phone": "1234567890"
},
{
"firstName": "S",
"surname": "D",
"primarySkills": [
"presentation"
],
"secondarySkills": [
"developer"
],
"email": "[email protected]",
"phone": "1234567890"
}
]
Expect Output:
[
{
"firstName": "John",
"surname": "Smith",
"primarySkills": "presentation",
"secondarySkills": "abc",
"email": "[email protected]",
"phone": "1234567890"
},
{
"firstName": "John",
"surname": "Smith",
"primarySkills": "developer",
"secondarySkills": "xyz",
"email": "[email protected]",
"phone": "1234567890"
}
{
"firstName": "S",
"surname": "D",
"primarySkills": "presentation",
"secondarySkills": "developer",
"email": "[email protected]",
"phone": "1234567890"
}
]
Can someone help me how this can be achieved.
Thank you in advance