trim the key and value 

trim the key and value of map