KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Swap key-value in dictionary Re: Swap key-value in dictionary

  • rolf

    Member
    August 19, 2022 at 12:00 am
    {key[x][i]!get[x]i:iasc key x:group(!). flip raze key[x],''get x}

    indexing into the keys instead of doing a lookup a smidge faster