I have following:
recs = conn.execute sql
output:
[{"mk1"=>"test007", 0=>"test007"}, {"mk1"=>"test009", 0=>"test009"}, {"mk1"=>"test0010", 0=>"test0010"}, {"mk1"=>"test00112", 0=>"test00112"}, {"mk1"=>"test345", 0=>"test345"}, {"mk1"=>"testprüfer", 0=>"testprüfer"}, {"mk1"=>"test3455", 0=>"test3455"}, {"mk1"=>"aaaa", 0=>"aaaa"}, {"mk1"=>"pat1", 0=>"pat1"}, {"mk1"=>"pat222", 0=>"pat222"}, {"mk1"=>"poook_patient", 0=>"poook_patient"}, {"mk1"=>"sylviaparient", 0=>"sylviaparient"}, {"mk1"=>"patient_of_sylvia", 0=>"patient_of_sylvia"}, {"mk1"=>"test0005", 0=>"test0005"}, {"mk1"=>"test0006", 0=>"test0006"}]
Is there a fast way to get only the values of "mk1"'s by using maybe not "execute" but something else? I would like to be faster then this one if it is possible:
mk1s = []
recs.each{|l| mks1s.push(l["mk1"]) }
Thank you in advance.
.map