title: JavaScript function not returning array as expected
body: <p>I've got a json array and a simple function to return a bit of data. I can log the bit of data I want to the console (the function currently does this for testing), but it's not returning.</p>
  
  <p>Stackers, please help my worn out brain and let me know where I've goofed.</p>
  
  <p>(code is super self explanatory, function call is at the bottom of the .js)</p>
  
  <p><a href="http://jsfiddle.net/BDJeU/" rel="nofollow noreferrer">http://jsfiddle.net/BDJeU/</a></p>
  
  <pre><code>function getCountryData(data, country)
  {
      $.each(data, function(index) {
  
          if( data[index]["Country"] == country )
          {
              console.log( data[index]["Country"] );
              console.log( data[index]["data"] );
              return data[index]["data"];
          }
      });
  }
  </code></pre>