Tell us what’s happening:
I am converting the JSON response to uppercase case if the environment value is “uppercase”, but it still not working. Kindly help with this
Have you tried doing the .toUpperCase() logic before the res? I don’t know the exact logic but I don’t believe you can execute the function within that.
You need to check the MESSAGE_STYLE inside of this function to allow for changes in the secrets/env.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Good day Jeremy, but that is what I did. I checked if MESSAGE_STYLE equals “uppercase” and output { message: “HELLO JSON” } if true and { message: “Hello json”} if not. Is that what it is meant to be?