I am posting this after seeing the posts in the forum related to “Add to Collection” and printing a list of strings. But somehow I could not get this right. Please suggest where I am wrong.Thank you!
See the pic. I have a JSON and I want to print all the postal code in that in a single line. I have the workflow too in the pic. But printing Str1 always just shows one postal code at a time. I need both like 45343, 45342
in your for each block you are initializing the list with new List…
so in the next loop the previous added item is overwritten.
Bring the new List(…) initialization before the loop and control the variable scope as well