This is confusing to me. forEach is a method on array, but the code seems to be written as if it's working on an object. Should this be iterating over Object.keys(payload.payload) instead?