Parsing this complicate JSON

do you think it would be easier to solve this with a java snipped node and let it always take the name und verdict chronologicly?

Hello !
I don’t use node which requires code so I can’t answer about Java snipped node. But I think JSONPath is sufficient… if I clearly understand the problem which seems not to be the case !
You say earlier you want 2.1 a-NONE, 2.1.1 b-NONE, 2.2 c-PASSED, 2.2.1 d-NONE, 2.2.2 e-NONE, 2.2.3 f-PASSED, … and the workflow result is exactly this :

What did I miss ?
Joël

i changed my wanted result, i want that it there are only integer numbers. The result cell look like 1/name/verdict, 2/name/verdict, 3/name/verdict, … . Can you adjust the workflow you sent me with that wanted result? Because with my changings always the testfolders come by 1,2,3,4,5,6,7 and then the teststeps.

and the chunk loop is necessary for this operation because the JSON is so nested

thank you a lot for your help Joel

So, here it is (with a new form of numerotation in the second String manipulation) . But for the sake of clarity : I add the dType information (just add a path in JSONPath) and modify slightly the presentation (GroupBy and concatenate with \n\r).
Can you point out what is expected (on the first sample you provide) :

2.1/a/NONE_temp : TestStepFolder

2.1.1/b/NONE_temp : TestStep

2.2/c/PASSED_temp : TestStepFolder

2.2.1/d/NONE_temp : TestStep

2.2.2/e/NONE_temp : TestStep

2.2.3/f/PASSED_temp : TestStepFolder

2.2.3.1/g/NONE_temp : TestStep

2.3/h/PASSED_temp : TestStepFolder

2.3.1/i/NONE_temp : TestStep

2.3.2/j/NONE_temp : TestStep

2.3.3/k/NONE_temp : TestStep

2.3.4/l/PASSED_temp : TestStepFolder

2.3.4.1/m/NONE_temp : TestStep

2.3.4.2/n/PASSED_temp : TestStep

2.3.4.3/o/PASSED_temp : TestStepFolder

2.3.4.3.1/p/PASSED_temp : TestStep

2.3.5/q/PASSED_temp : TestStepFolder

2.3.5.1/r/PASSED_temp : TestStep

2.3.6/s/NONE_temp : TestStepFolder

2.3.6.1/t/NONE_temp : TestStepFolder

2.3.6.1.1/u/NONE_temp : TestStep

2.4/v/PASSED_temp : TestStepFolder

2.4.1/w/NONE_temp : TestStepFolder

2.4.1.1/x/NONE_temp : TestStep

2.4.2/z/PASSED_temp : TestStep

2.4.3/z/PASSED_temp : TestStep

2.4.4/aa/PASSED_temp : TestStep

2.4.5/ab/PASSED_temp : TestStep

2.5/ac/PASSED_temp : TestStepFolder

2.5.1/ad/PASSED_temp : TestStep

2.5.2/ae/PASSED_temp : TestStep

2.5.3/af/PASSED_temp : TestStep

2.6/ag/PASSED_temp : TestStep

2.7/ah/NONE_temp : TestStep

Best,
json_v2.knwf (156,2 Ko)

1 Like

I just see your another post. Here is a modification :

1/a/NONE_temp : TestStepFolder

2/b/NONE_temp : TestStep

3/c/PASSED_temp : TestStepFolder

4/d/NONE_temp : TestStep

5/e/NONE_temp : TestStep

6/f/PASSED_temp : TestStepFolder

7/g/NONE_temp : TestStep

8/h/PASSED_temp : TestStepFolder

9/i/NONE_temp : TestStep

10/j/NONE_temp : TestStep

11/k/NONE_temp : TestStep

12/l/PASSED_temp : TestStepFolder

13/m/NONE_temp : TestStep

14/n/PASSED_temp : TestStep

15/o/PASSED_temp : TestStepFolder

16/p/PASSED_temp : TestStep

17/q/PASSED_temp : TestStepFolder

18/r/PASSED_temp : TestStep

19/s/NONE_temp : TestStepFolder

20/t/NONE_temp : TestStepFolder

21/u/NONE_temp : TestStep

22/v/PASSED_temp : TestStepFolder

23/w/NONE_temp : TestStepFolder

24/x/NONE_temp : TestStep

25/z/PASSED_temp : TestStep

26/z/PASSED_temp : TestStep

27/aa/PASSED_temp : TestStep

28/ab/PASSED_temp : TestStep

29/ac/PASSED_temp : TestStepFolder

30/ad/PASSED_temp : TestStep

31/ae/PASSED_temp : TestStep

32/af/PASSED_temp : TestStep

33/ag/PASSED_temp : TestStep

34/ah/NONE_temp : TestStep

Best,
json_v3.knwf (194,6 Ko)

1 Like

thanks for your answer i am very happy and thankful for your patience, the result doesnt need the “_temp : TestStep”. Only 1/name/verdict, 2/name/verdict, 3/name/verdict, …

Yes : I add just to understand what is expected. If it is ok, you can suppress here :

Is it what you want ?

Joel

3 Likes

i can not thank you enough! Great solution :slight_smile:
Wish you all the best!

greetings Simon

1 Like

Hi @simonmng,
Happy to know that all is ok !
Have a great day,
Joel

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.