It looks like you are looking for dojox.lang.functional.object.forIn
.
There is no actual documentation page in the dojo link, just a small example in the article Functional Fun in JavaScript with Dojo :
The dojox.lang.functional.object module defines important object helpers:
df.forIn(object, callback[, thisObject])
If you have something against using this module, you can also easily create your own version:
function objEach(obj, f, scope){ for(var key in obj){ if(obj.hasOwnProperty(key)){ f.call(scope, obj[key], key); } } }
For arrays, dojo.forEach () already exists in the base library.
source share