2
output application/json

var name = vars.uname
---
{
    
   vars.name: name, //-----> Here i am not able too retreive variable as key
   
   description: payload.text
    
    }

for reference

afelisatti
  • 2,770
  • 1
  • 13
  • 21
Sri Rockz
  • 85
  • 1
  • 9

1 Answers1

3

You need to use parenthesis in the key to specify that is an expression.

output application/json

var name = vars.uname
---
{
    
   (vars.name): name, //-----> Here i am not able too retreive variable as key
   
   description: payload.text
    
}
machaval
  • 4,969
  • 14
  • 20