How do i extract the first value out of a nested list


#1

see the image

why am i not getting 5 values on the watch node (meaning i want the nested [0] value out of the first 5 entries on the list)

it works if i manually say

x[0][0] x[1][0] x[2][0] x[3][0] x[4][0]

but not if i say

listlength={0,1,2,3,4};

x[listlength][0]

it does not work as in the image

 

thanks

extract

 


#2

We will track that issue in our internal defect tracking system.

But you can achieve the same results using List.Map node. (see attached image)

So List.Map will apply List.GetItemAtIndex on each List of List and will return first element of each array.

extract the first value