I want to check if an object has any data in it inside of cities, so basically it would show true for data for this:
JSON
{"cities":[{"id":0,"client_id":"1","storename":"test","notes":"test","rejected":"on","offer":"test","time":1394457477525}]}
and false for this:
{"cities":[]}
Currently my code is incorrect as its not checking inside of cities just if its empty or not, is there any way I can adapt my code for it to work?
JavaScript
if (jQuery.isEmptyObject(JsonData) == false) {
$('#upload').show();
alert("There is data");
} else {
$('#upload').hide();
alert("There is no data");
}