# un-dict

**URL:** <https://forum.kx.com/t/un-dict/10049>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [July 2, 2015, 12:51pm UTC](https://forum.kx.com/t/un-dict/10049 "2015-07-02T12:51:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![effbiae](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@effbiae](https://forum.kx.com/u/effbiae)\
**Post date:** [July 2, 2015, 12:51pm UTC](https://forum.kx.com/t/un-dict/10049/1 "2015-07-02T12:51:00Z")

</div>

I have a dict that I want to un-dict - and do a little more with.&nbsp;

q)d:“SAB”!(enlist “A”;(“aAd”;“B”);(“bBc”;“”))

This is what I’m doing at the moment:

q){raze (,‘’).(key x; x)}d

“SA”

“AaAd”

“AB”

“BbBc”

,“B”

or

k){,/(,‘’).(!x;. x)}d

(“SA”;“AaAd”;“AB”;“BbBc”;,“B”)

is there a builtin that does {(key x;value x)}?

or is there a shorter way to write this operation?

thanks,

jack.

---

<div class="post-metadata">

**Author:** ![sieber\_m1](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sieber\_m1](https://forum.kx.com/u/sieber_m1)\
**Post date:** [July 2, 2015, 6:07pm UTC](https://forum.kx.com/t/un-dict/10049/2 "2015-07-02T18:07:00Z")

</div>

Hi,

the shortest way i can find is  
k) ,/(!d),‘’. d

you can also write &nbsp;{(key x;value x)} as &nbsp; k)(!:;.:)@:

Markus
