We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

how to pass values to json object

Priti18
Tera Expert

how can I pass the incident category value dynamically in key value format

 

var inccategory = current.category.getDisplayValue();

 var result = "{'category':inccategory} // this gives me error but if I print logs then I am able to see correct value

1 ACCEPTED SOLUTION

Remove the quotes around the curly braces:

var result = {"category":inccategory};

View solution in original post

10 REPLIES 10

Awesome it worked!!!

can you please explain as well so for future any one can take reference from this