This is a plugin for Insomnia that allows to eval javascript code to use in environment variables.
Install the insomnia-plugin-js-eval
plugin from Preferences > Plugins.
Add jseval
to your desired environment variable and put your js code in Javascript code
input