My webhook returns an array of elements. I need to make IBM Watson Assistant respond with those elements as options to the users.
How can I achieve that?
@data_henrik response was very helpful but it was little vague. So, I thought to post my own answer. I made some changes in my function so that the result it returns matches the options format just like in the image below.
And just as @data_henrik suggested, I stored that result in a context variable named myOptions and used it like :
<? output.generic.addAll($myOptions) ?>