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.