Extract data pairs from a list of associations?

I am starting to use the new Associations, so this maybe an easy question, but I haven't figured it out. I have a list of associations, like:

{<|k1->v1,k2->v2, ..., k3->v3|>, <|q1->w1,q2->w2, ..., q3->w3|>, ...}


and I would like to extract a list of data pairs of the form

{{v1,v2}, {w1,w2}, ...}


How can I do this?

There are pure association forms using Part with key names or positions for this.

(* Using key names *)
Values[assoc[[All, {"one", "two"}]]]

(* using positions *)
Values[assoc[[All, 1 ;; 2]]]

• this doesn't seem to work if the keys in the association are arbitrary real numbers May 15 '19 at 23:02

Building an example association:

tab = Table[{"one" -> i, "two" -> i^2, "three" -> i^3}, {i, 1, 10}];


and

assoc = Association @@@ tab;


If I understand your question right you are only interested in the first two values, so you can do the following:

vals = Values @ tab


and

Take[#, 2] & /@ vals


But if you want to process further on, it might be a good idea to store the information in a dataset ds = Dataset[assoc] then you can simply extract the columns you want.