title: Sort 2 different lists that both contains the same value by common value
body: <p>I have to lists that looks like this:</p>
  
  <pre><code>list1 = [ ["name1", 100], ["name2", 33], ["name3", 22]]
  list2 = [ ["name2", 1], ["name1", -1], ["name3", 0]]
  </code></pre>
  
  <p>The lists contains between <code>0</code> and <code>20</code> names</p>
  
  <p>The names in both lists are exactly the same, but the integer values are different.  </p>
  
  <p>Is it possible to sort list2 so that the <em>order of the names</em> is the same as in list1?</p>
  
  <p>The order of the names vary, so it must be a flexible solution that can sort the names no matter where they are placed in <code>list2</code>.</p>
  
  <p>I want the output to look like this:<br>
  <code>list1 = [ ["name1", 100], ["name2", 33], ["name3", 22]]</code>  </p>
  
  <p><code>list2 = [ ["name1", -1], ["name2", 1], ["name3", 0]]</code></p>