score:3

Accepted answer

May be like this using filter + slice:

var data = [
  {name: "A", rank: 0, c: 92},

  {name: "B", rank: 45, c: 99},

  {name: "C", rank: 89, c: 89},

  {name: "D", rank: 23, c: 99},

  {name: "E", rank: 56, c: 98}
];
var size = 3; //user input size that is needed
var result = data.filter(function(d) {return (+d.rank > 10)}).slice(0,size)
console.log(result)


Related Query