Accessing an element within an list within a list

I have a list of lists. I am trying to filter based on an element in the inner list and compare it to time so that the code performs only on that temporary list. Here is the outer list.

I would like to pull out the 18985 and compare it to the current-time global variable within a loop. If it matches, it needs to pull all the lists with 18985 in the first element. My code so far is :

I am getting this runtime error

It seems like it is accessing the first list in the outer list, but not by the first element of the inner list. (18985). Current-edges needs to a list of the 2 lists with 18985. then for each list in current-edges, I need to assign the source and target nodes and create an edge.

When I ask to show current-edge in the command center- it states there is nothing named current-edges. Did I use filter wrong?

Thank you!

Hi @pandora,

If I’m understanding your code correctly, it seems like what you’re trying to do is loop through current-edges, and for each element in the list, get source-n and target-n. However, your current code is trying to get those values from the whole current-edges list, instead of just the current element. To fix this, you’ll need to provide a name for the current element in the list so that you can access it inside the loop. That would look something like this:

Hope this helps!

Isaac B.

this worked perfect! thank you.