Implemented JobBuilder::toArray() using recursive iterator