Filter list by first column

Hello, everyone!

I’m working in Dynamo for Civil 3D 2024 and I need to filter a list of sublists (a 2D list) based on the value in the first column of each sublist.

Each sublist looks like this:

[“SubassemblyParameter.Name”, “SubassemblyParameter.Value”]

What I want to do is keep only the sublists whose first item (the name) matches a few specific parameter names listed in the code block.

What’s the correct way to filter a list like this based on values in the first column?

Any help or example would be greatly appreciated. Thanks in advance!

Alternative 1

Alternative 2

1 Like