https://discord.gg/botpress logo
Why {"first":"John","last":"Doe"} instead of just...
# šŸ¤help
b
I hope some can help me out here. I use a node to ask for the full name and in the following node i want to use @workflow.workerfullname to make the bot more personal. The only problem is that the bot is saying this back; Thanks {"first":"John","last":"Doe"} I have tried a lot and it seems like i have to make a 'action' in data/global/actions but i cant find this directory. What do i have to do to make the bot just say; Thanks John. Thanks for the help.
w
Hi šŸ‘‹ if your variable is a json array like you said, try {{workflow.workerfullname.first}}
b
Hey thanks but i get a error that its undefined.
w
What is exactlythe content stored in the variable ?
b
{"first":"john","last":"doe"} I use a question to ask the fullname which is saved here; @workflow.workerfullname
w
Ah okay sorry Try {{workflow.workerfullname[ā€˜first’]
JavaScript notation
b
I get this back Thanks {{workflow.workerfullname[ā€˜first’]
Solved! {{workflow.workerfullname.first}} This is it! Thanks!! for the help!!
w
Hum that’s strange that didn’t work the first time
Nice though !
3 Views