Dictionary subset

Is there a way to subset a dictionary without having to reconstruct it?In the example below, the last output is what I want:q)d:til[5]!5#.Q.aq)d0| a1| b2| c3| d4| eq)d where 2

(where 2<key d)#d

maybe 3_d  is simpler…?

 

I think it will depend on your searching criteria over the key. the idea would be using cut(_)

yourkeytocut _ yourdict

(where not key[d]>2)_d

? 2014?7?20???UTC+1??6?36?23??Leon Baum???

Is there a way to subset a dictionary without having to reconstruct it?

In the example below, the last output is what I want:

q)d:til[5]!5#.Q.a
q)d
0| a
1| b
2| c
3| d
4| e
q)d where 2<key d
“de”
q){(key[d]x)!value[d]x} where 2<key d
3| d
4| e