If I have data in json like this :
{"items":[{"id":"2049","channel_code":"HBD","channel_name":"HBO HD"}]}
And if you search my data to the server could not find results like this :
{"items":[]}
Of output as above, how do I read that my data does not exist or is empty?
I have written some code that I got but have not found the results I want.
This code :
var data = { Name: "John Doe", Age: 25, Address: null, CityState: "Denver, CO" };
for (member in data) {
if (data[member] != null)
//Do something
}
or
if (myObject == '') {
alert('this object is empty');
}
Maybe someone can help me find a way out of this example. Please help