Remove unneeded keys from JSON hashes