title: Sort array containing objects based on another array using _Underscore
body: <p>I already read the previous questions answered, but it didn't fit with my need.</p>
  
  <p>I have an array of objects such as </p>
  
  <pre><code>var Widgets = [
               [{Id: 'abcdef', post_id: 12345}],
               [{Id: 'ghijkl', post_id: 45678}],
               [{Id: 'mnoptq', post_id: 90123}]
  ];
  </code></pre>
  
  <p>I have a second array :</p>
  
  <pre><code>var sortArray = ['ghijkl', 'mnoptq', 'abcdef'];
  </code></pre>
  
  <p>I need To reorder Widgets with the initial order of elements which appears on sortArray</p>
  
  <p>i've succeed to do it this way</p>
  
  <pre><code>sortArray.forEach(function(Id) {
                      var found = false;                  
                      Widgets = Widgets.filter(function(Widget) {
                          if(!found &amp;&amp; Widget.Id == Id) {
                              NewWidgets.push(Widget);
                              found = true;
                              return false;
                          } else {
                              return true;
                          }
                      });
                  });
  </code></pre>
  
  <p>But I wish to improve this code by using _SortBy but I didn't succeed so far...</p>
  
  <p>Anyhelp ?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Final result should be </p>
  
  <pre><code>var Widgets = [
               [{Id: 'ghijkl', post_id: 45678}],
               [{Id: 'mnoptq', post_id: 90123}],
               [{Id: 'abcdef', post_id: 12345}]
  ];
  </code></pre>