Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var data = [ {text_name:'My life' , score: [{name : 'james',score: 10} , 
                                           {name : 'john',score : 40} , 
                                           {name : 'Abu',score : 80}] },
              {text_name:'The game real', score: [{name : 'penny',score: 30},
                                           {name : 'john',score : 20} , 
                                           {name : 'Abu',score : 30}] }];
var d = data.map(function(d) {
  return d.score.sort(function(a, b) {
    return a.score + b.score;
  });
});
console.log(d);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
omarjmhpro
0viewers