Группа действий: JSON
Действие возвращает значение из JSON по JSONPath
JSON - JSON для обработки
JSONPath - JSONPath описывает путь до элемента JSON.
Значение - Переменная, содержащая значение из JSON. Значение возвращается в виде строки.
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
JSON | JSON for processing | Robin.JSON | Yes | |
JSONPath | JSONPath describes the path to the JSON element. It always starts with a „/“ character. The corresponding keys are listed below. Indexes are used to access array elements (counting starts from 0). For example, the path „/key/1“ indicates that we are trying to access the second element of the array, which is accessible by the key „key“. | Robin.String | Yes | |
Results | ||||
Value | Variable containing value from JSON. The value is returned as a string. | Robin.Object |
Особые условия использования
Отсутствуют.
Получить значение элемента lastName из JSON файла test.json
{ "firstname":"Joe", "lastname": "Jackson", "gender":"male", "age": 28, "address": { "streetAddress": "101", "city": "San Diego", "state": "CA" }, "phonenumber": [ { "type": "home", "number": "9349282382"} ] } |
Воспользоваться действиями "Open", "Get value".
Программный робот отработал успешно. Значение требуемого элемента получено.