Iterates over all items in the first level of an object or array
and calls an iterator funciton on each item.
The iterator function is called with four values:
The current item's value
The current item's key
The parent object, which contains the current item
The root object
Setting the optional third parameter to 'top-down' or 'bottom-up' will cause
it to also recursively iterate over items in sub-objects or sub-arrays in the
specified direction.
// {Object|Array} object - The object or array to iterate over
// {function} fn - the iterator funciton to call on each item
// {boolean = false} errors - Show errors?
// {void}
'forEach' function
Iterates over all items in the first level of an object or array and calls an iterator funciton on each item.
The iterator function is called with four values:
Setting the optional third parameter to 'top-down' or 'bottom-up' will cause it to also recursively iterate over items in sub-objects or sub-arrays in the specified direction.
// {Object|Array} object - The object or array to iterate over // {function} fn - the iterator funciton to call on each item // {boolean = false} errors - Show errors? // {void}