JSON JQ TRANSFORM

Updated 1 week ago by Karan

Byteline provides an easy-to-use JQ tool, which is used in converting JSON data from one structure to another. JQ supports the same set of data types as JSON that includes numbers, strings, booleans, arrays, objects, and null. JSON JQ Transform uses JQ expression to convert a JSON input to another JSON structure. 

Byteline offers a simple and user-friendly interface to help you with the easy configuration of a JQ node without touching a line of code. 

Byteline supports two ways to convert JSON JQ from one format to another.  

  • Method 1: With JSON JQ Transform task node. 
  • Method 2: With JQ function.

Let’s find out.

Method 1: With JSON JQ Transform task node. 

Follow the below-mentioned steps to easily configure JQ in Byteline. 

Create 

For this documentation, we are assuming you have already initiated a flow using Webhook trigger node followed by Reddit node. JQ can work with any trigger. For creating a flow design, you can refer to the guide here

Follow the steps outlined below to configure the JQ node. 

Step 1: Click on the add button to select the next node for the flow. 

Step 2: Select the JSON JQ Transform node to transform the JSON input to another JSON structure using JQ query expression. 

Configuration

Step 1: Click on the edit button to configure the JSON JQ Transform node. 

Step 2: For Source Data, click on the corresponding selector button to pick the Source Data array. 

Step 3: For JQ Expression, enter the JQ expression that you want to run on the selected source data.

Step 4: Click on the Save button to save the node configuration.

Method 2: With JQ function

Step 1: Go to the selector tool in a node to select a function.

Step 2: Click on the Function tab. 

Step 3: Click on the JQ function to transform the JSON input to another JSON structure.

Step 4: Enter the JQ expression in the field. This JQ expression will be run on the data on which the function is added.

Step 5: Click on the Save button to save the expression.

Thus you can use functions in your nodes to set them into the right format. Feel free to connect us for any doubt. 


How did we do?