Thanks a lot. It works well for me and it is very succinct. Also the answer made me aware of how to use assoc , merge-with , apply , dissoc , group-by and map in one single example which is awesome .
–
AshAug 26 '11 at 21:44