title: Move array item to front by object key
body: <p>So I have an array of objects;</p>
  
  <pre><code>[
      {
          "foo": 2,
          "bar": "test"
      },
      {
          "foo": 19,
          "bar": "value"
      },
      {
          "foo": 7,
          "bar": "temp"
      }
  ]
  </code></pre>
  
  <p>I need to move an object with a particular value of <code>foo</code> to the beginning of the array. The value is always in the object, but there's no guarantee the object will be in the array.</p>
  
  <p>So after running <code>moveToFront(19);</code> for instance, I'd have the following:</p>
  
  <pre><code>[
      {
          "foo": 19,
          "bar": "value"
      },
      {
          "foo": 2,
          "bar": "test"
      },
      {
          "foo": 7,
          "bar": "temp"
      }
  ]
  </code></pre>
  
  <p>How would I go about doing this?</p>