Rezzy
Rezzy

Reputation: 141

How to get index of elements in a nested list kdb

Lets say I have a nested list: (`a`b`c;`d`e`f;`g`h`i) I have another list of indexes i:(1 0 3)

How do I use the list of indexes, to retrieve symbols from the list. The desired output should be (`b`d`) (the last symbol is null)

Thanks!

Upvotes: 0

Views: 633

Answers (1)

user12704155
user12704155

Reputation:

You will need to use the apply operator @ with the each-both iterator ':

q)list @' i
`b`d`

Upvotes: 6

Related Questions