97
rated 0 times
[
100]
[
3]
/ answers: 1 / hits: 85139
/ 12 Years ago, thu, december 20, 2012, 12:00:00
I have an object like this:
ricHistory = {
name1: [{
test1: value1,
test2: value2,
test3: value3
}],
name2: [{
test1: value1,
test2: value2,
test3: value3
}]
};
Now I want to check if e.g. name2 is empty with Javascript/jQuery. I know the method hasOwnProperty
. It work for data.hasOwnProperty('name2')
only if the name exists or not, but I have to check if its empty.
More From » jquery