Added a foreach module to simplify iterating over objects and arrays