Skip to main content
Nintex Community Menu Bar
Solved

What's the JSONPath to correctly parse this NWCToolkit response?

  • December 16, 2025
  • 1 reply
  • 7 views

Forum|alt.badge.img+2

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”?

Best answer by paulsm4

I found the answer

$.*
  • $: The root object or array
  • .: Selects the specified property in a parent object
  • *: Wildcard selects all elements in an object or an array
  • $.*: selects “result” and “error” from the JSON returned by NWCToolkit.base64encodefile, and produces a 2-element Collection object, with the JSON contents.

1 reply

Forum|alt.badge.img+2
  • Author
  • Rookie
  • Answer
  • December 17, 2025

I found the answer

$.*
  • $: The root object or array
  • .: Selects the specified property in a parent object
  • *: Wildcard selects all elements in an object or an array
  • $.*: selects “result” and “error” from the JSON returned by NWCToolkit.base64encodefile, and produces a 2-element Collection object, with the JSON contents.