So I have a structure like that:
Foo: {
A: Array[0],
B: Array[0],
C: Array[1]
}
where [X] is length of the array, but Foo is an object, not an Array, therefore I can't use Array method on it.
How do I get first element (letter in this case) which has length > 0 ?
for (let letter in Foo) {
if (letter.length > 0) {
let match = letter;
}
}
I tried something like this (this is simplified version), but it just returns all properties of Foo.