问题描述
有一个自定义应用程序...输出我需要像第一个示例。这是否需要在通信区域中处理以更改它,或者是否有特定的参数类型和 JSON 使其在用户输入后以这种方式输出?
**Needs to be like this**
"customField":
{
"kp14ZxNc79KW8ve9aprQ": "red"
}
**Instead of this.**
"customField": {
"id": "kp14ZxNc79KW8ve9aprQ","value": "red"
}
解决方法
您可以在通信选项卡中使用迭代功能并使用输出来显示数据
"response": {
"iterate": "{{body}}","output": {
"label": "{{customField.id}}","value": "{{customField.value}}","error": {
"message": "ErrorCode: [{{statusCode}}] {{body.message}} description: {{body.description}}"
}
}