Is there a method to search inside an object similar to methods for an array?
-
Things like .indexOf() or .contains()
How can I find out if an object contains an element? -
@VirtualVirgin Good old fashioned loop.
inline function objectContains(key) { local result = false; for (x in obj) { if (isDefined(x[key])) return true; } return result; }
If you're just looking at the top level of the object then simply
isDefined(obj[key])