Using local vars in interaction json formatting functions.