List grouping

Hi everyone!

Please, does anyone know how to create a new list, keeping the structure, with the grouping that I highlight with different colours?

Thank you!

You can use Flatten to flatten the list but the index will change.

list grouping.dyn (11.8 KB)

@truevis gave you one option. The other is to provide a list of paired indices and the proper list levels.

If I understood what you’re trying to accomplish, you can try this:

or in a code block: