根据返回的JSON更新上下文变量

问题描述

我需要根据从我的API返回的JSON更新watson助手中节点的JSON。

示例:我助手的一个节点的响应显示了一个选项列表,下面的JSON创建了该选项列表。

{"output": { "generic": [ { "title": "aaaaa","options": [ { "label": "aaaaa","value": { "input": { "text": "a" } } },{ "label": "bbbbb","value": { "input": { "text": "b" } } } ],"response_type": "option" } ] } }

我需要更改此JSON并放入来自我的API的JSON,下面是JSON的示例。

{"output": { "generic": [ { "title": "Relação de Cidades","options": [ { "label": "São Paulo","value": { "input": { "text": "SP" } } },{ "label": "Rio de janeiro","value": { "input": { "text": "RJ" } } },{ "label": "Bahia","value": { "input": { "text": "BA" } } } ],"response_type": "option" } ] },"context": {} }

或者我可以将从API返回的JSON直接发送到对话中,以便它组合JSON创建的选项列表...吗?

我尝试将JSON放入变量中,并在对话中显示该变量的内容,但它显示的是JSON的内容,而不是组装JSON定义的列表。

结果如下。我是这样的:

enter image description here

感谢您的帮助,因为在互联网上找不到任何可以帮助我解决该问题的材料。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)