My question is how do I filter out what appears to be a blank key in a zipmap?
Although I have a workaround to my problem, knowing how to filter the key would be very helpful.
: [: [ ]] ([ ]) 3 ,,
was produced by
(println first-ent, " ", map-ent, " ", val-ent, " ", (count out-csv), " ", out-csv)
in this function
(defn missing-accts "Prints accounts found in one report but not the other." [report-header mapped-data out-file] (spit out-file (str "\n\n" report-header "\n\n") :append true) (doseq [map-ent mapped-data] (let [first-ent (first map-ent) val-ent (rest map-ent) out-csv (if first-ent (str (name (key map-ent)) "," (first (val map-ent)) "," (last (val map-ent)) "\n") nil)] (println first-ent, " ", map-ent, " ", val-ent, " ", (count out-csv), " ", out-csv) (if (> (count out-csv) 3) (spit out-file out-csv :append true) (println "Skipping: ", out-csv)))))
The fact that the output with the blank key has a count of 3 allows me to filter does not seem as clean a solution as being able to detect a blank key. Finding and filtering out a blank key is what has me stumped.