# First item of first sublist, second item of second sublist

**URL:** <https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262>\
**Category:** Uncategorized\
**Created:** [August 24, 2017, 11:01am UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262 "2017-08-24T11:01:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaac.wall](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@isaac.wall](https://forum.dynamobim.com/u/isaac.wall)\
**Post date:** [August 24, 2017, 11:01am UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262/1 "2017-08-24T11:01:51Z")

</div>

Hi all,

First time posting here but reading other posts on these forums has been an invaluable resource as I’ve been learning Dynamo so many thanks for that.

So I have a problem which sounds simple but I can’t work out. What it comes to is that I have a list which has N sublists, all of which have N sublists of their own. There are further levels of nesting beyond this, but I don’t think that’s relevant right now. What I want is to return the first element of the first sublist, the second element of the second sublist, the third of the third sublist and so on. Basically for a list ‘X’ I would want a new list ‘Y’ where Y[n] = X [n][n] for all n between 0 and N-1 i.e Y = {X[0][0],X[1][1],X[2][2]…}. Is this something anyone has encountered before?

Many Thanks

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [August 24, 2017, 12:50pm UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262/2 "2017-08-24T12:50:27Z")

</div>

Like this?  
 ![NthOfNth](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/d/7d8073fd4f1ef20f1c9d8edf46499f94336aea33.PNG)

---

<div class="post-metadata">

**Author:** ![isaac.wall](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@isaac.wall](https://forum.dynamobim.com/u/isaac.wall)\
**Post date:** [August 24, 2017, 12:58pm UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262/3 "2017-08-24T12:58:46Z")

</div>

Exactly like that!

I eventually worked out my own solution by basically flattening the list and having a section of the graph working out the indices I wanted to retrieve. Yours is a much simpler solution although I have to admit I don’t entirely understand it, I haven’t used the ‘use levels’ checkbox before. Is there a tutorial anywhere you’re aware of which explains how exactly this works?

Many thanks again for your solution!

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [August 24, 2017, 1:24pm UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262/4 "2017-08-24T13:24:20Z")

</div>

Start here:  
[http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/](http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/)

---

<div class="post-metadata">

**Author:** ![isaac.wall](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@isaac.wall](https://forum.dynamobim.com/u/isaac.wall)\
**Post date:** [August 24, 2017, 1:29pm UTC](https://forum.dynamobim.com/t/first-item-of-first-sublist-second-item-of-second-sublist/14262/5 "2017-08-24T13:29:40Z")

</div>

Many thanks Andreas
