It’s very helpful that you posted the JSON response but it’s not valid JSON. There must be a bracket missing. You can paste your JSON response into Best JSON Viewer and JSON Beautifier Online on the left side and then click Tree Viewer to see the valid JSON (or error message) on the right side.
Edit: It was valid JSON but the forums converter your quotes to non-standard quotes. I replaced them and it now works on CodeBeautify.
This site will indent JSON (click Validate JSON). To keep the indentations when posting on the forums, include three back ticks (```) before and after the text.
Note that I’m using a shorthand property reference of “elements1[1].lineitems.elements2”. This is the same as getting the “elements2” property from the “lineitems” property from the first item of the list generated by the “elements1” property.
Your last suggestion was the one I started before but I discovered that elements2 is a dynamic list, it can be none, one or more. This prompted me to ask for help.
Can I use For-Each Block within For-each Block, the outer For-Each will be for the Name in elements1 and the inner For-Each will be for the Name and Modifications in elements2? But I’m not sure what to put in the Get-Property and Of-Object in the inner For-Each block.
Yes, you can nest loop blocks. You may have to adjust the timing a little with a Wait 0 Seconds block (which actually waits more than 0 seconds!) but I’d try it first without any delays and see if it works. If you get stuck, post screenshots or a link to your project and we can go from there.
Another option is to loop through the outer JSON array/list and store that in a variable. Then, in the second loop, use that variable as input for parsing the next info. That way you don’t have to worry as much about the timing.