I am looking for a way to “zip” a multikey map to a normal map. My multimap looks like this:
Key v a l u e s
<string> <string>
140,1,08,2500 1456
140,1,10,3040 1456
............. ....
............. ....
140,1,08,2500 8g
140,1,13,3040 8g
............. ....
The first and the penultimate key are identical. My goal is to merge these two (and all other duplicate key pairs) lines so that the result is:
140,1,08,2500 14568g
The values belonging to the original two keys being merged. Now, I could write some nice loop and iterate and copy and delete stuff and so on, but I wonder if anyone knows a smart, maybe even fast way to get this done.
Keep it simple…
Why make it more complicated?