renameKey
See original GitHub issueIs your feature request related to a problem? Please describe.
Renames single key of an object.
Describe the solution you’d like
const obj = {key: 1};
RA.renameKey('key', 'renamedKey', obj); //=> {renamedKey: 1}
Describe alternatives you’ve considered
RA.renameKeyWith
Additional context
This function should be implemented as specialization of R.renameKeys. Ramda cookbook contains reference to this function. After the implement edit cookbook and the reference there.
- implement the function
- add ref to ramda cookbook
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Lodash _.renameKeys() Method - GeeksforGeeks
renameKeys () method takes an object and a mapping object and returns a new object where the keys of the given object have...
Read more >JavaScript: Object Rename Key - Stack Overflow
In case someone needs to rename a list of properties: function renameKeys(obj ...
Read more >Rename object keys - 30 seconds of code
Replaces the names of multiple object keys with the values provided.
Read more >renameKeys | 30 Seconds of Typescript - Deepak Vishwakarma
renameKeys. JS TODO. Replaces the names of multiple object keys with the values provided. Use Object.keys() in combination with Array.prototype.reduce() and ...
Read more >rename-keys - npm
Modify the names of the own enumerable properties (keys) of an object.. Latest version: 2.0.1, last published: 5 years ago.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note: we already have
renameKeyWith
implemented in https://github.com/char0n/ramda-adjunct/issues/1228. As mentioned above, it would be best to implementrenameKey
as specialization ofrenameKeyWith
(if possible).Happy to grab this!