Hi guys,
It's me again. I'm checking if objects containg value with Object.keys like below:
Object.keys(obj).length Code (markup):

It would return the list like this:
0
0
0
3
0
0 Code (markup):

The list is unordered and number of items is variable depending on an amount of objects being checked. It would generated automatically. So how do I pick the only one that has data and ignore the rest.
I do the switch and it isn't working.

var flag;
switch (Object.keys(obj).length) {
case 3:... Code (markup):

How to pick only one object from the lish that has data and ignore the rest