Human friendly WordPress Automation
Some actions (or parameters) will return data that can be used in subsequent actions. In many cases this data will come in the form of an array or an object. To make it possible to pick out the desired data element from a piece of returned data, WunderAutomation uses JSONPath syntax.
JSONPath is a standard syntax that makes it possible to pick out a single element from a complex structure. Let’s assume you have an action that calls a remote API that in turn gives the following JSON structure:
If you’re interested in using the “id” value of this structure, you can get to it using a JSONPath expression:
NOTE: Normally in JSONPath, the above expression would be written as “$.result.id”, but when working with JSONPath expressions in WunderAutomation you can skip the opening “$.”.
JSONPath also works for a lot more complex situations. Given the JSON data:
The following JSONPath expression would return the string “next item”:
The following built in actions return data:
Powered by BetterDocs
Your email address will not be published. Required fields are marked *
Yes, sign me up for informational and marketing emails from wundermatics.com
Save my name, email, and website in this browser for the next time I comment.