Flattening and cleaning a list

Hi

Is there a way to simultaneously flatten and trade the Empty List for 0 maintaining the indexes at L2 the using Code Blocks or other nodes?

Captura de tela 2022-05-11 120156

If the sublists are always going to have one item …

List.LastItem(List.AddItemToFront(0,a<1>)<1>);

3 Likes

Brilliant! Thanks a lot!

1 Like