This works well if:
flow.get("row") gives a number
and
incoming msg.payload carry an array which has that amount of members so it does not look outside of array boundaries
and
incoming msg.payload[the number of the row] has property called with name payload.
If you make sure those conditions are met, It should work flawlessly.
Use debugging options to be sure.
Also such kind of functions should have some fallback for situations when conditions are not met.
Depending on what the real case is but I'd start with easy things like: