Turn an association into a list of lists?

Hi everyone,

How would I combine the keys of an association with its corresponding values to create a list of lists?

Regards,

Gregory

There are probably better ways to do this, but

Partition[Riffle[Keys[testAssoc], Values[testAssoc]], 2]

seems to get the job done.

If your association isn’t nested:

KeyValueMap[List, asso]

Join[{Keys[asso[1]]}, Values[asso]]

This here also could work:

List @@@ Normal[assoc]

Cheers,

M.

Hi Marco, Ming Yang, Kuba, and Christopher,
Thanks for your tips. So many ways to do it!

Gregory