Iterate Array Inside Array and aggregate values

Hello everyone,

I have a question on a specific case that I am currently facing.

I currently pull some data from a provider where I group them by client. Each of the data generates a grouped values like this:

Then what I need is to iterate through the array and then again through the array inside of each of Parcel Items so I then can generae a JSON with all the information.
Is there any good way on doing this?

My output should be quite easy as to generate a JSON.

Best,
Ezequiel