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>
  <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
</head>
<body>
<script src="//jashkenas.github.io/underscore/underscore-min.js"></script>
  <h1>Sorting Object by multiple keys using UnderScore.js</h1>
  
  <h2>Goal:</h2>
  <hr>
  <table>
    <tr>
        <th>available_in</th>
        <th>available_for</th>
    </tr>
    <tr>
        <td>90</td><td>Infinity</td>
    </tr>
    <tr>
        <td>90</td><td>30</td>
    </tr>
    <tr>
        <td>195</td><td>Infinity</td>
    </tr>
  </table>
  
  <h2>Input:</h2>
  <hr>
  <table id="input_table">
    <tr>
        <th>available_in</th>
        <th>available_for</th>
    </tr>
  </table>
  
  <h2>Output:</h2>
  <hr>
  <table id="output_table">
    <tr>
        <th>available_in</th>
        <th>available_for</th>
    </tr>
  </table>
</body>
</html>
Output

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

Dismiss x
public
Bin info
TonySpegelpro
0viewers