cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a better/shorter way to lookup a dictionary by index

JP
New Contributor III
... the following homemade function:

idicval:{y (flip enlist key y) x}        /with <x> index position, <y> dictionary

Thx in advance,
JP
4 REPLIES 4

michael_mcparla
New Contributor
If you just require the value returned as in your current version:
{value[y]x} 

pauljloughran
New Contributor
{value[y]x} 

JP
New Contributor III
Yep, indeed... Thx to both, Paul & Michael

Hi,

Just another form of above answer,

{ (value y) x}

Thanks ,
Mahesh Pancha