Your code actually works perfectly outside of my subflow (below). This is what I'm trying to do.
I am using this:
https://flows.nodered.org/flow/43501a1b424434de0ffb
To iterate over an array line_items where there is a key named total inside each object.
For each iteration, I am using a change node to change total into netPrice.

This works perfectly.
Then I need to convert that value (netPrice) into the forementioned format.
Tried placing the function node here, but that did not work:

Placing it before or after my subflow doesn't work either without specifying which object.