Get random X items from array in javascript
<p>I have the following fiddle using test data, and I am looking through data using $.each</p>

<p>I can loop through no problem, but I want to loop through the data, and then get 3 objects from it at random.  </p>

<p>Any tips or tricks would help:</p>

<p><a href="https://jsfiddle.net/inkedraskal/pah44qv6/" rel="nofollow">https://jsfiddle.net/inkedraskal/pah44qv6/</a></p>

<pre><code>$.each(testData,function(x, blah){
    //console.log(blah._id);

  //this gets each objects id &amp; picture, but I want to get 3 random objects, and their corresponding data
  var activeValue = blah._id,
        pictureValue = blah.picture;


  var markUp = '';

  markUp += activeValue + pictureValue;

  console.log(markUp);
});
</code></pre>

<p>with the question below, they need to be unique**</p>