Hello all,
Through a soap API call, I am requesting an XML file that I have managed to turn into a json string, and that I would like to split into separate items. Now I need a field key name being one of the values.
The string looks like this:
[
{
"propertyName": {
"BREAKFAST": {
"DESCRIPTION": "Breakfast",
"NETTTOTAL": "410.5900",
"TAXTOTAL": "36.9100",
"GROSSTOTAL": "447.5000"
},
"GOLF_BEER": {
"DESCRIPTION": "Golf Beer",
"NETTTOTAL": "142.1100",
"TAXTOTAL": "12.7900",
"GROSSTOTAL": "154.9000"
},
"GOLF_CT": {
"DESCRIPTION": "Golf Coffee/Tea",
"NETTTOTAL": "368.3300",
"TAXTOTAL": "33.0700",
"GROSSTOTAL": "401.4000"
},
"GOLF_FOOD": {
"DESCRIPTION": "Golf Food",
"NETTTOTAL": "392.6500",
"TAXTOTAL": "35.3500",
"GROSSTOTAL": "428.0000"
},
"GOLF_LIQ": {
"DESCRIPTION": "Golf Liquor",
"NETTTOTAL": "0.0000",
"TAXTOTAL": "0.0000",
"GROSSTOTAL": "0.0000"
},
"GOLF_SODA": {
"DESCRIPTION": "Golf Soda",
"NETTTOTAL": "112.8700",
"TAXTOTAL": "10.1300",
"GROSSTOTAL": "123.0000"
},
"GOLF_WINE": {
"DESCRIPTION": "Golf Wine",
"NETTTOTAL": "127.3900",
"TAXTOTAL": "26.7100",
"GROSSTOTAL": "154.1000"
}
}
}
]
I would like to turn this into separate items, that would look like this:
GOLF_BEER | Golf Beer | 142.1100 | 12.7900 | 154.9000
GOLF_CT | Golf Coffee/Tea | 368.3300 | 33.0700 | 401.4000
(these would be records 2 and 3 from the example string above). So 5 fields in each record.
I think I would need a function node to achieve something like this, but I wish I was that good with coding
Would there be someone able to help me out?
Thanks! - Maarten