I am running a $.each on my JSON data which is getting parsed, the next thing im trying to do in that $.each is check the data from the JSON output against the .text() of each div which have id's of "status".
This is where the problem is coming in, it is only reporting the first div's .text() for each div entry with the id of "status".
$.each(JSON.parse(data), function(idx, value){
console.log(value.id, value.status)
$('#status').each(function() {
alert($(this).text());
});
at first I tried to just run the $.each on the JSON parse and inside that do a if
if(value.status== 'online') {
but that also just returned the first div for each div entry...
Please can someone assist me with this and point out where im going wrong