I am merging two hashmaps in clojure, but it is giving unexpected results. Below are the two datasets I am merging:
({:TEST"E", :EMEA "0", :NA "0", :ASPAC "180"}
{:TEST"B", :EMEA "0", :NA "70", :ASPAC "0"}
{:TEST"D", :EMEA "38", :NA "0", :ASPAC "0"}
{:TEST"C", :EMEA "0", :NA "0", :ASPAC "0"}
{:TEST"G", :EMEA "360", :NA "0", :ASPAC "0"}
{:TEST"A", :EMEA "45", :NA "0", :ASPAC "0"}
{:TEST"F", :EMEA "0", :NA "0", :ASPAC "66"})
({:TEST"A", :EMEA_1 "40", :NA_1 "0", :ASPAC_1 "0"}
{:TEST"B", :EMEA_1 "90", :NA_1 "0", :ASPAC_1 "0"}
{:TEST"H", :EMEA_1 "0", :NA_1 "120", :ASPAC_1 "0"}
{:TEST"C", :EMEA_1 "0", :NA_1 "85", :ASPAC_1 "0"})
I am expecting to see somethig like this:
({:TEST"A", :EMEA "45", :NA "0", :ASPAC "0", :EMEA_1 "40", :NA_1 "0", :ASPAC_1 "0"}
{:TEST"B", :EMEA "0", :NA "70", :ASPAC "0", :EMEA_1 "90", :NA_1 "0", :ASPAC_1 "0"}
{:TEST"C", :EMEA "0", :NA "0", :ASPAC "0", :EMEA_1 "0", :NA_1 "85", :ASPAC_1 "0"}
{:TEST"D", :EMEA "38", :NA "0", :ASPAC "0", :EMEA_1 nil, :NA_1 nil, :ASPAC_1 nil}
{:TEST"E", :EMEA "0", :NA "0", :ASPAC "180", :EMEA_1 nil, :NA_1 nil, :ASPAC_1 nil}
{:TEST"F", :EMEA "0", :NA "0", :ASPAC "66", :EMEA_1 nil, :NA_1 nil, :ASPAC_1 nil}
{:TEST"G", :EMEA "360", :NA "0", :ASPAC "0", :EMEA_1 nil, :NA_1 nil, :ASPAC_1 nil}
{:TEST"H", :EMEA nil, :NA nil, :ASPAC nil, :EMEA_1 "0", :NA_1 "120", :ASPAC_1 "0"})
I have tried using merge, merge-wth, apply merge-with but nothing is giving me the results I expected.
Any adivse on how I can get to my desired resultset or why I am actually not geting what I am expecting would also be helpful.
Thanks you.