Applying a list structure to a flatten list

Morning all,
so i have that list of viewports (from all sheets) that i flatten to group by key.
Aftet the gouping i would like to track back the sheets that this viewport is coming from.

Why don’t you preserve the structure, why flatten it?

(perhaps explain a little bit what you are trying to do?)

It’s a good question… the logic was wrong. Got it figured out

And here’s what i was after