Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am parsing json data which looks like this: { "guidelines": { "total": 4, "results" : [ { "Field_2": "AAA_222" "Field_3": "AAA_333" "Field_4": "AAA_444" }, { "Field_1": "BBB_111" "Field_2": "BBB_222" "Field_3": "BBB_333" "Field_4": "BBB_444" } ] } } When I parse this data with the tfileInputJSON component I get the following result: total Field_1 Field_2 Field_3 Field_4 4 BBB_111 AAA_222 AAA_333 AAA_444 4 null BBB_222 BBB_333 BBB_444 The "BBB_111" belongs on the second row, not the first. The parser is "rolling up" the values due to Field_1 not requiring a value in the first row. I used "JasonPath without Loop", "JasonPath" produced a similar effect, ie. there was no placeholder for the empty Field_1 value. Here's the JSONPath query: "$.guidelines.total" "$.guidelines.results[*].Field_1" "$.guidelines.results[*].Field_2" "$.guidelines.results[*].Field_3" "$.guidelines.results[*].Field_4" Can any advise on how I can get the parser to out put the data correctly with the value "BBB_111" on the second line and null on the first? Many thanks, Bob.
with Json , it worked in two steps
Can you please attach Sample JSON .
Sorry Also can you please reformat your request , it is not easy to read.
Not sure what happened there, but, I am parsing json data which looks like this:
{ "guidelines": {
"total": 4,
"results" : [
{
"Field_2": "AAA_222"
"Field_3": "AAA_333"
"Field_4": "AAA_444"
},
{
"Field_1": "BBB_111"
"Field_2": "BBB_222"
"Field_3": "BBB_333"
"Field_4": "BBB_444"
}
]
}
}
When I parse this data with the tfileInputJSON component I get the following result:
total Field_1 Field_2 Field_3 Field_4
4 BBB_111 AAA_222 AAA_333 AAA_444
4 null BBB_222 BBB_333 BBB_444
The "BBB_111" belongs on the second row, not the first. The parser is "rolling up" the values due to Field_1 not requiring a value in the first row. I used "JasonPath without Loop", "JasonPath" produced a similar effect, ie. there was no placeholder for the empty Field_1 value.
Here's the JSONPath query:
"$.guidelines.total"
"$.guidelines.results[*].Field_1"
"$.guidelines.results[*].Field_2"
"$.guidelines.results[*].Field_3"
"$.guidelines.results[*].Field_4"
Can any advise on how I can get the parser to out put the data correctly with the value "BBB_111" on the second line and null on the first?
Many thanks,
Bob.
I tried Xpath stuff , it worked for me
with Json , it worked in two steps
At last, got it to work.
Thank you!