Preprocess the json before injecting it.

A way to modify the content of the json on the fly before injecting.
I couldn't figure out how to get around this since its a nested method. I'll look into this some more.