Courseiva
API Automation →mediumMultiple Choice

UiPath-ADPv1 API Automation Practice Question

A developer uses the HTTP Request activity in a UiPath Studio project to call a REST API that returns a deeply nested JSON response. The developer needs to extract a specific value located at a path of several levels, and the response structure may vary slightly between calls. The developer wants to avoid deserializing the entire payload into custom classes. Which approach is most appropriate?

⚠ Common exam trap

The trap here is assuming that any deserialization target can handle nested JSON, when only dynamic types like JObject support path-based queries without custom classes.

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 TypeArgument set to Newtonsoft.Json.Linq.JObject, then use the SelectToken method with a JSONPath expression to retrieve the nested value.

Using JObject with SelectToken leverages JSONPath to query nested values without predefined classes, which is ideal when the JSON structure may vary. It avoids brittle string parsing and the rigidity of tabular or dictionary-based deserialization, providing a flexible and maintainable solution for extracting deep values from REST API responses.

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 JSON activity with the TypeArgument set to System.Data.DataTable, then use the Select method to filter rows containing the desired value.

    Why it's wrong here

    Deserializing JSON into a DataTable requires a flat, tabular structure; deeply nested JSON will not map correctly and will likely cause an exception or lose hierarchical data. The Select method works on rows, not on nested objects, so it cannot reliably extract a value several levels deep.

  • ✗

    Use the Deserialize JSON activity with the TypeArgument set to System.Collections.Generic.Dictionary(Of String, Object), then access nested levels using repeated TryGetValue calls.

    Why it's wrong here

    A generic Dictionary only works for flat key-value pairs; nested JSON objects deserialize as additional Dictionary types or JObject, requiring manual casting and type checks at each level. This approach becomes cumbersome and does not elegantly handle variable structures compared to a JSONPath query.

  • ✓

    Use the Deserialize JSON activity with the TypeArgument set to Newtonsoft.Json.Linq.JObject, then use the SelectToken method with a JSONPath expression to retrieve the nested value.

    Why this is correct

    Deserializing to JObject allows dynamic traversal without predefined classes, and SelectToken supports JSONPath queries to extract nested values reliably even when the structure varies. This directly addresses the need to avoid custom classes while handling a deep, potentially inconsistent JSON hierarchy.

  • ✗

    Use the HTTP Request activity with the Response Content property set to a string, then apply regular expressions to parse the raw JSON text for the desired value.

    Why it's wrong here

    Regular expressions on raw JSON are brittle because they cannot reliably handle escaping, whitespace variations, or structural changes. While the response is a string, extracting a deeply nested value with regex is error-prone and violates the goal of a robust, maintainable integration.

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.