I have an API (NWCToolkit Xtension, base64encodefile) that returns two JSON elements: “error” and “result”:
"Result": {
"description": "Model for Result",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"x-example": ""
},
"result": {
"type": "string",
"x-example": "SGV5IHdoYXRzIGdvaW5nIG9u"
}
}
},
Since the workflow designer GUI doesn’t seem to have any way to differentiate “error” and “result”, I’m using the Query JSON action to parse the results. Query JSON uses a JSONPath expression, and returns a Collection.
Q: What JSONPath expression do I need to return a Collection with two elements: “error” and “results”?