http://ramdajs.com/0.21.0/docs/#prop
var myObject = {a: 1, b: 2, c: 3, d: 4};
var newObject = R.filter(R.props('a'), myObject);
//var newObject = R.filter(R.equals(R.props('a')), myObject);
console.log('newObject', newObject);
Right now the code above is returning the entire object:
newObject
{"a":1,"b":2,"c":3,"d":4}
What I would like to do is just return a new object with just the 'a'
key. Or a new object with the a
and b
keys.