Oops, ‘my-map’ should be ‘my-map-sequence’ assuming ‘my-map-sequence’ is
something like [{:name ‘roelof’ :city ‘secret’} {:name ‘somewhere-else’ :city
‘who-knows’}]
A solution using juxt: (map (partial clojure.string/join ",") (map (juxt :a :b)
[{:a "a1" :b "b1"} {:a "a2" :b "b2"}]))
> On 23 Oct 2015, at 12:49, r/ Wobben <[email protected]> wrote:
>
> Hello,
>
> As a challenge I need to convert a map structure to a csv structure.
>
> So ( { :name "roelof", :city secret }) need to be converted to roelof, secret.
>
> I think I can use something like (map clojure.string/join ..) for it but it
> seems I have to make a function out of the :name roelof part to get roelof
> back.
>
> I could use get for then I do not know how to call 1 records of the whole
> map.
>
> Can someone explain in simple English how I can solve this one ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> <http://groups.google.com/group/clojure?hl=en>
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.