I want to at text to the output of a value.
if value exists in a variable then prepend the word/text “NAME:”
lets say the value for data.name is JOHNDOE, I want to prepend with the text “NAME:” so the output now looks like NAME: JOHNDOE. I am able to do this by using this {ifempty(NAME: .data.name; )} but by doing this it always adds the Text “NAME:” even if the value is empty. So when there is no value in data.name I still get the text NAME:.
I only want NAME: prepended to the output when there is a value set for data.name
Any help would be appreciated.
Thank You