I want to go from this list of maps, returned by a jdbc query:
'({:series_id 1 :expires_at "t1"} {:series_id 2 :expires_at "t2"})
to a single map like:
{1 "t1" 2 "t2"}
That's so I can look up expires_at using simply the series_id integer.
I've got as far as:
db.core=> (mapcat #((comp vals select-keys) %1 [:series_id :expires_at])
'({:series_id 1, :expires_at "t1"} {:series_id 2 :expires_at "t2"}))
(1 "t1" 2 "t2")
but that's a list, not a map.
I wonder if this is a candidate for reduce, and/or if there are some other neat ways to do it.