You might also want to add a little data filtration on the keys and values to at least strip leading and trailing whitespace otherwise "a=>4" will generate a different key to say " a =>4". Something like: