Get information from list

CaptureGet information from list.dyn (8.9 KB)

Hi everyone,

I have problem get information from the list.
Is there any way to get the list by the information by the first items
For examble, if my level 1 list’s first items is letter ‘b’ the result will be a list from ‘b’ to 10

Any help would be appreciated. Thank you!

Something like this:

Thank you for your help!

I don’t have the node ‘GetKeys’, can you provide the custome package name (if have one)
And can you please explain the code in the code block please because I’m not so good in Python code.

image

Getkeys is a part of the core nodes, so if you have dynamo you have “GetKeys”…

There is no Python in the graph shown by @salvatoredragotta only a codeblock containing a shorthand “if” statement in DesignScript (the language written in codeblocks in Dynamo).

the question asked in the codeblock is:

If “first” is equal to “val” then return “lst” with the index “key”, else return “null”

1 Like

Thank you @Jonathan.Olesen

I’m using Dynamo v2.0 and it doesn’t have that node “GetKeys”…
Is there any other way to get that node?

And I understand the code block now thank to your ez explaination :smile:

You could simply use a codeblock with the content:

0…Count(x)-1

This will create the “keys” this codeblock will replace getkeys in the graph shown.

1 Like