Help Centre › Building Processes
This article describes the RPA Loop functionality to each record from a JSON file.
For a full list of available functions, please read LOOP functions.
Description
The LOOP Each record from a JSON file function allows you to each record from a JSON file.
Setting it up
To use the LOOP Each record from a JSON file function, follow these instructions:
{{popups:rpas/add:action=loop-json}}
Once on a process map:
- Navigate to the process where you would like to add the LOOP Each record from a JSON file function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the LOOP Each record from a JSON file option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File | Yes | Text | - | The path to the JSON file |
| Variable | Yes | Text | - | Variable to store the current item |
| Max iterations | No | Number | - | Maximum iterations |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | The current JSON item in each iteration |
Errors
| Error | Description |
|---|---|
| File not found | The JSON file does not exist |
| Invalid JSON | The file does not contain valid JSON |
Tips
- Loops through items in a JSON array file