Hi,
I am parsing json response and grouping the json objects using regex. For certain elements, I can have 0-many sub elements. consider this:
json_name | json_valueString | SN | Col | new_column |
0.type | sample | 0 | type | 123 |
0.id | 123 | 0 | id | 123 |
0.status | active | 0 | status | 123 |
0.0.link | abc.def | 0 | 0.link | 123 |
0.1.link | asd.fgh | 0 | 1.link | 123 |
1.type | sample_1 | 1 | type | 555 |
1.id | 555 | 1 | id | 555 |
1.status | active | 1 | status | 555 |
1.0.link | pqr.def | 1 | 0.link | 555 |
1.1.link | lkj.fgh | 1 | 1.link | 555 |
1.2.link | wer.tyu | 1 | 2.link | 555 |
SN 0 represents an element group and SN 1 represents another element group. new_column is the column I want to derive based on id value for each of these groups. The reason to do so is for me to create the following csv:
id | link |
123 | abc.def |
123 | asd.fgh |
555 | pqr.def |
555 | lkj.fgh |
555 | wer.tyu |
Could someone please suggest ideas as to how to assign the id value for rows belonging to the same SN group.
Solved! Go to Solution.
@toral Use formula tool to create 'new column'. The condition would be: "if [SN]=0 then 123 else 555 endif "
Hope this helps!
@toral
find the workflow attached
made this dynamic so you can use with original data set as well.
mark done if solved.
Appreciate all the suggestions and responses. Thanks much. I used the solution suggested by flying008