Compare two lists with names (newbie)?

Hi to all,

Sorry for this stupid topic, but I can’t figure out how to compare two list with names (not numbers).
Since I like to filter in Rhino selected objects to match just particular layer names, I am using Human Object Attributes component to get Layer names from selected objects. I created a new panel with the layer name I want to be selected. At the end, I use Equal component to filter the data, but:

The result from Equal component is a list with items!? I assume that GH Equal Component can’t compare Text items?

What should I change/add in definition?

Thank you for any comment.

Hi,

not sure if I understand you correctly :sweat_smile:, but to compare lists of text you can use the Match Text component I guess.

CompareLists.gh (3.7 KB)
Hello, @007.

Yes, = component can’t be used to compare texts.

In this case, you should use a very simple Expression script. It will return some booleans, determining whether the layer should be selected. Then you can select the desired layers with Cull pattern:

Thank you Fernardo and Alfredo.

Is it also possible to select filtered items with GH?

Dispatch List splits the List into True and False