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.
Stackers, please help my worn out brain and let me know where I've goofed.
(code is super self explanatory, function call is at the bottom of the .js)
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"];
}
});
}