Hi everyone,
How would I combine the keys of an association with its corresponding values to create a list of lists?
Regards,
Gregory
Hi Marco, Ming Yang, Kuba, and Christopher, Thanks for your tips. So many ways to do it!
This here also could work:
List @@@ Normal[assoc]
Cheers,
M.
Join[{Keys[asso[[1]]]}, Values[asso]]
If your association isn't nested:
KeyValueMap[List, asso]
There are probably better ways to do this, but
Partition[Riffle[Keys[testAssoc], Values[testAssoc]], 2]
seems to get the job done.