Correctly loop Array of elements, see a not working example below

for (var thing in sdata.facets["somefacet"]["terms"]) { console.log(thing); }
0
1
2
3
4
5
find
findFirst