Contains key Version 6 (Java)
Action group: JSON
Description
The action checks if the JSON contains the key
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
JSON | JSON for processing | Robin.JSON | Yes | |
Key | Key in the JSON | Robin.String | Yes | |
Results | ||||
Result | Logical variable whose value is true if the key is contained in the JSON, otherwise false. | Robin.Boolean | true |
Special conditions of use
None.
Example of use
Task
Check if the JSON file test.json contains the key "firstname".
Solution
Use the "Open", "Contains key" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open" action parameters.
- Set the "Contains key" action parameters.
- Click "Start" in the top panel.
Result
The program robot completed successfully. JSON does contain the key.
Обзор
Инструменты контента