Courseiva
API Automation →mediumMultiple Choice

UiPath-ADPv1 API Automation Practice Question

A developer has built a UiPath API workflow that calls a vendor's REST endpoint returning a JSON object with a nested 'items' array. The response is large, and the developer needs to extract only the 'id' field from each element in 'items' to feed a downstream process. The HTTP Request activity's output is stored in a variable of type String. Which approach should the developer use to reliably extract the required values?

⚠ Common exam trap

The trap here is assuming that string manipulation or regex is sufficient for JSON parsing, ignoring the structured nature of JSON and the availability of dedicated deserialization activities.

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

✓

Use the Deserialize JSON activity with the response string and then access the nested array using a JSONPath expression such as "$.items[*].id".

The Deserialize JSON activity is purpose-built for parsing JSON strings into a manipulable object. Using JSONPath with "$.items[*].id" directly retrieves the needed array of ids without brittle string parsing. This method is robust against formatting changes and is the UiPath-recommended way to handle nested JSON payloads in API workflows.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use the Deserialize XML activity after converting the JSON string to XML using a custom conversion function.

    Why it's wrong here

    Deserialize XML expects XML input, not JSON. Converting JSON to XML manually is error-prone and unnecessary because UiPath provides native JSON handling. This approach adds overhead and potential data loss during conversion, and is not the recommended practice.

  • ✗

    Use a RegEx Matches activity with the pattern "\"id\":\s*\"(.*?)\"" on the response string to capture all id values.

    Why it's wrong here

    RegEx on JSON is brittle: it fails with nested objects, escaped characters, or when the 'id' key appears elsewhere. It also does not validate JSON structure. While it may work for simple payloads, it is not reliable for production and violates maintainability best practices.

  • ✓

    Use the Deserialize JSON activity with the response string and then access the nested array using a JSONPath expression such as "$.items[*].id".

    Why this is correct

    Deserialize JSON converts the raw string into a JObject, enabling JSONPath queries. The expression "$.items[*].id" selects all id values from the items array, returning a JArray that can be iterated. This is the standard UiPath method for parsing structured JSON and avoids fragile string manipulation.

  • ✗

    Use the Execute JavaScript activity to run a JavaScript snippet that parses the JSON and returns the ids as a comma-separated string.

    Why it's wrong here

    Execute JavaScript is not a standard UiPath activity for JSON parsing; it requires a browser context and adds unnecessary complexity. It also introduces a dependency on a JavaScript runtime, which is not ideal for server-side automation and may not be available in unattended robots.

About these practice questions

One of 276 original UiPath-ADPv1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-ADPv1 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-ADPv1 exam.