mrAlbertZwolle
mrAlbertZwolle7mo ago

Is it a bug or do I do something wrong? Try to add parameters to a value field.

Maybe it's very easy, I really don't understand it... See picture. This is the return value: 'Lezer is: ${ctx["root"]["request"]["body"].namereader}' + Dit is het resultaat: ${ctx["root"]["request"]["body"].namereader} This is the result: Lezer is: ${ctx["root"]["request"]["body"].namereader}Dit is het resultaat: Albert How can I add the body parameters to a value field?
#❓・buildship-help
No description
Solution:
In the first string, you'll require to add back ticks instead of single quotes ' '. Lezer is: ${ctx["root"]["request"]["body"].namereader} just like you did in second line. Then it will work.
Jump to solution
6 Replies
Solution
Gaurav Chadha
Gaurav Chadha7mo ago
In the first string, you'll require to add back ticks instead of single quotes ' '. Lezer is: ${ctx["root"]["request"]["body"].namereader} just like you did in second line. Then it will work.
mrAlbertZwolle
mrAlbertZwolle7mo ago
really? Is that the thing. Never knew there's a difference. 🙂
Gaurav Chadha
Gaurav Chadha7mo ago
In back ticks, it will be able to read template literals (variables you pass), in string it won't.
mrAlbertZwolle
mrAlbertZwolle7mo ago
it works. 🙂 🙂 I'll check how to make back ticks. thanks so much!
Gaurav Chadha
Gaurav Chadha7mo ago
Cool, You can also refer to this to learn about template strings usage - https://www.w3schools.com/js/js_string_templates.asp.
No description
Gaurav Chadha
Gaurav Chadha7mo ago
Happy to help. 🙂