Skip to content
Advertisement

Rename keys with ramda js

JavaScript

expected output:

JavaScript

I’m thinking the renamed keys are defined in an object (but fine if there’s a better way to map them):

JavaScript

How can I do this with Ramda?

Something with R.map

Advertisement

Answer

There is an entry in Ramda’s Cookbook for this:

JavaScript
JavaScript

But with the ubiquity of ES6, it’s pretty easy to write this directly:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement