Courseiva
API-Based Automation →mediumMultiple Choice

UiPath-ADAv1 API-Based Automation Practice Question

A UiPath developer is building an automation that calls a REST API to retrieve a list of active employees. The API returns the following JSON response: {"employees": [{"id": 101, "name": "Alice"}, {"id": 102, "name": "Bob"}], "total": 2}. The developer uses the HTTP Request activity, which outputs the response as a string variable named apiResponse. The developer then uses a Deserialize JSON activity to convert apiResponse into a JObject variable named jsonObj. To iterate through each employee and extract the name, which expression correctly retrieves the array of employee objects from jsonObj?

⚠ Common exam trap

The trap here is assuming that dot notation (jsonObj.employees) works for accessing JSON properties in UiPath, when actually the JObject indexer with a string key is required.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

jsonObj("employees")

The JSON response has a top-level property 'employees' that contains an array of objects. After deserializing into a JObject, the correct way to retrieve this array is by using the indexer with the property name as a string, yielding a JArray. This JArray can then be used in a For Each loop to access each employee's name. The other expressions either extract only a single value, use unsupported syntax, or convert the array to a string, none of which meet the requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    jsonObj.employees

    Why it's wrong here

    While some programming languages allow dot notation to access JSON properties, UiPath's JObject does not support direct property access like jsonObj.employees. Attempting this would cause a compilation error or runtime exception because JObject requires indexer or method-based access. The correct approach uses the indexer with the property name as a string. Thus, this option is invalid in UiPath workflows, despite being intuitive for developers from other backgrounds.

  • ✓

    jsonObj("employees")

    Why this is correct

    In UiPath, when you deserialize a JSON string into a JObject, you can access properties using the indexer syntax. The property 'employees' is a top-level key, so jsonObj("employees") returns a JArray containing the employee objects. This expression is correct because it directly references the key and yields the array needed for iteration. The other options either incorrectly navigate the structure or use unsupported syntax, making this the only valid choice.

  • ✗

    jsonObj.SelectToken("$.employees[0].name")

    Why it's wrong here

    The SelectToken method with the JSONPath expression '$.employees[0].name' returns the value of the first employee's name, which is a string, not the array of employee objects. This would not allow iteration over all employees. The developer needs the entire array, not a single name. Therefore, this expression is incorrect for the stated goal, even though it is syntactically valid and would work if only the first name were needed.

  • ✗

    jsonObj("employees").ToString()

    Why it's wrong here

    Calling ToString() on the result of jsonObj("employees") converts the JArray into a string representation, which is not useful for iterating through individual employee objects. The developer would then need to parse the string again, defeating the purpose. The goal is to obtain the JArray directly for use in a For Each activity. Converting to string loses the structured data and prevents direct access to properties like 'name' and 'id'.

About these practice questions

Courseiva writes every UiPath-ADAv1 question from scratch — 285 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official UiPath exam blueprint

This UiPath-ADAv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADAv1 exam.