I have a use case where I need to modify the key name and value based on some condition. In javascript its very simple using lodash lib https://lodash.com/docs/4.17.15.
B