Today’s data-driven society places a premium on the ability to extract, modify, and manage JSON data, which is essential for effective corporate operations. The JSONata Plugin can help users in this situation by enabling JSON querying and manipulation within Workload Automation workflows.
Before introducing the plugin, let’s take a quick look at JSONata.
JSONata is a potent query and transformation language created especially for use with JSON data. JSONata is a flexible and effective tool for extracting, manipulating, and transforming data in JSON format because of its clear syntax and expressive features. Whether you’re working with intricate nested structures or enormous JSON databases, JSONata makes it easier to query and transform the data – which frees you to focus on drawing insightful conclusions from it.
Suppose we have the following sample JSON:
Using JSONata, we can perform various queries to extract the desired information. For example, we can use the following query to get the names of employees:
$.employees.name
This query returns an array with the names of employees:
[“John”, “Emily”, “Michael”]
We can also filter employees based on age using a query like this:
$.employees[age > 30]
This query returns an array of objects that include only employees above the age of 30:
[
{
“name”: “John”,
“age”: 32,
“department”: “IT”
},
{
“name”: “Michael”,
“age”: 45,
“department”: “Finance”
}
]
To further analyze the data, let’s calculate the average age of employees. We can achieve this using an aggregated query:
$average(employees.(age))
This query calculates the average age based on the age property of each employee and returns the result: 35.
These illustrations show the potential of JSONata queries for collecting and altering data. You can easily work with and gain insights from complex JSON structures thanks to JSONata’s flexibility and expressiveness.
If you’re eager to investigate other JSONata queries and find new ways to maximize the value of your data, check out the JSONata documentation, which provides comprehensive examples, syntactic explanations, and helpful hints to help you grasp the art of JSON data transformation.
You can also use the JSONata exerciser, an interactive program that offers practical training. It’s a terrific way to improve your knowledge of JSONata as well as your data transformation skills.
Simplify Data Manipulation with the JSONata Plugin
The JSONata Plugin is a powerful tool that brings the abilities of JSONata, a versatile query and transformation language for JSON data, to your Workload Automation environment. This plugin extends beyond JSON data and supports querying and conversion of XML and YAML data as well.
The JSONata Plugin makes it simple to carry out intricate data manipulations and extract the data you require from your documents. A result is automatically saved as an output property for the task for each query that is run using the plugin. This enables seamless data flow and task integration by allowing the outcome of one query to be used as the input for future jobs in a jobstream.
The JSONata Plugin is notable for its handling of XML and YAML documents. When XML or YAML data is encountered, the plugin automatically converts it to JSON format, enabling you to use JSONata queries with no further effort. This flexibility now lets you use JSONata to greatest advantage across a variety of data formats, eliminating the need for manual conversion.
In addition, the JSONata Plugin makes it easy to pass variables, enabling you to supply the input document from a previous job, such as a RESTful service. As a result, it’s simple to chain jobs together, passing the results of one job as the input for queries in other processes that use JSONata. This dynamic workflow connection makes it easy to construct complex data processing pipelines.
The JSONata Plugin is quick and effective whether you’re carrying out straightforward data filtering or intricate modifications. You can harness the power of JSONata and streamline your data manipulation chores with Workload Automation, providing quicker and more precise data processing throughout your automation workflows.
The JSONata Plugin can be found in the category of the WorkLoad Designer catalogue devoted to tools for data manipulation and transformation. See the image below to learn where you can get the JSONata Plugin for easy integration into your automation workflows.
In the Action tab, you must specify:
- The document formats.
- The input document, whose format should match the one provided above.
- One or more queries to be performed on the document, where the name of each one has to correspond to the name of an output property containing the result of the query.
You can now submit the job according to the current plan. After selecting the Submit icon, click Ok. You can move to the Monitoring and Reporting tab to check what’s happening when a confirmation message appears.
You can visit the monitor page to see the status of the work after you’ve submitted it:
You can view the job log from the monitor page:
You can view the output properties of the job from the monitor page:
The JSONata Plugin for Workload Automation provides robust JSON, XML, and YAML data manipulation capabilities. Your automation workflows can easily extract, manipulate, and filter data by incorporating JSONata queries into them. Variable passing is supported by the plugin, enabling dynamic input from diverse sources. Optimize your data processing operations using Workload Automation’s efficiency and versatility with JSONata.
Start a Conversation with Us
We’re here to help you find the right solutions and support you in achieving your business goals.