the foreach wrapper works the same way for an array or object
use the pack wrapper
bugfix