How to get last index value of sublists?

Hi all,

I’m stuck at a point where i need to create a list of all the “Last index values of my sublists” and cannot think of anything to move further. Attached within is the screenshot of my list with sublists and highlighted are the values i need to be created as a new list!

Thanks in advance for your help!

Assuming each list does not have any repeating values, you can use the List.LastItem node @L2, then use the List.IndexOf with proper levels to get the index of each item. So, List.LastItem would give you [[7], [9], [9]] and List.IndexOf would give you [[2], [3], [3]].

1 Like

Change the Levels (play arrows) to get different depths in your lists.

2 Likes

Thankyou @cgartland and @SeanP. That was pretty easy than i thought! I appreciate your time and consideration!