Ramda get length of the object

js:


var data = {

 'one': {id: 10, name: 'user-10'},

 'two': {id: 15, name: 'w-user-15'},

 'three': {id: 20, name: 'user-20'},

};



var len = R.pipe(

  R.keys,

  R.length

)(data);



alert( JSON.stringify(len) );

Result:

Leave a Comment