In the splitter, you can put the base object, like $ child_errors, though as long as you end up with a proper jason object, you can use it.
In a mapper, in this particular case, $reason will be set to: Table ‘Netsuite.PAYROLL_ITEMS’ doesn’t exist, error code: 1146, SQL state: 42S02
You are over thinking this as, internally, stuff like this is treated as jason and given special treatment as such. Of course formatting as CSV allows you to treat it that way, etc… AND, if you have this down to one level, you can even have it formatted to CSV.
So a lot of what you are trying to work through is already done.
This is also why supratim’s method will work. If you notice, it starts with the string “$reason”. The other items, like .substring() are methods you can use on that string to do things like extract a portion of it.