08-31-2023 03:31 PM
I have a document like this:
[
{
"first": ["1", "2"],
"second": "a"
},
{
"first": ["3", "4"],
"second": "b"
}
]
And I'm trying to convert it to a table like this:
First | Second |
1 | a |
2 | a |
3 | b |
4 | b |
I'm thinking I need to use the "map" or "mapValue" function but I can't figure out how to do it. Any ideas?
Solved! Go to Solution.
09-01-2023 12:56 AM - edited 09-01-2023 12:56 AM
Hi @maahutch ,
You can use the JSON Splitter snap. You will need to split the $first and add the $second as an included path.
Include paths allow you to include objects from the input document in the resulting output document.
After JSON Splitter you will need to rename the column name because, by default, the snap will return splitValue.
Hope this helps!
BR.
Ivica
09-01-2023 12:56 AM - edited 09-01-2023 12:56 AM
Hi @maahutch ,
You can use the JSON Splitter snap. You will need to split the $first and add the $second as an included path.
Include paths allow you to include objects from the input document in the resulting output document.
After JSON Splitter you will need to rename the column name because, by default, the snap will return splitValue.
Hope this helps!
BR.
Ivica