I just did this but for a more complex data structure so it doesn't quite
map to your example. I did it this way:


1. Stringify-keys
2. Merge the data, then pull the keys to get the unique fields
3. Join all the keys got in part 2 with "," to create a header record
4. Now, for each record, pull the value for each of the keys you discovered
5. Surround with quotes, if you might have commas in the data, or use tab
separators to avoid that mess
6. Join each field in the record with a comma.
7. Join all the records with a newline.

I also filtered out restricted records and my map was not flat, so I
flattened it. I'm also pulled the data out of a database based on a
filtered search, so the whole thing took about 16 lines. Without all that
nonsense, it'd probably be 7-8 lines.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to