Skip to Main Content
InterSystems Ideas
We love hearing from our users. Tell us what you want to see next and upvote ideas from the community.
* Bugs and troubleshooting should as usual go through InterSystems support.
Status Needs review
Created by Ashok Kumar T
Created on Jun 23, 2025

recursive search in Abstract Set Query

1️⃣ Description of the Idea
Introduce recursive search capability in InterSystems Abstract Set Query (ASQ) to efficiently navigate and retrieve data from complex %DynamicObject and %DynamicArray structures. This enhancement enables querying deeply nested JSON data without manually traversing each level.

2️⃣ Who is the Target Audience?
Primarily developers who work with dynamic JSON structures in InterSystems IRIS or similar environments.

3️⃣ What Problem Does It Solve?

Data retrieval from deeply nested JSON objects and arrays. Instead of writing extensive loop logic(%GetIterator() ), developers can perform targeted searches (e.g., retrieve all occurrences of a specific key) using a single ASQ expression.

4️⃣ How Does This Impact the Efficiency, Stability, Reliability, etc., of the Product?

  • Efficiency: Reduces the complexity and lines of code required for JSON parsing and querying.

  • Stability: Minimizes human error by removing the need for custom recursive logic.

  • Reliability: Ensures consistent and predictable query behavior across varied data structures.

5️⃣ Use Case Example

case 1: Consider a FHIR Bundle resource that contains multiple nested Observation entries, each with various components including valueQuantity fields with a value key. To extract all numeric values from valueQuantity across the entire bundle, regardless of nesting depth, you can use the recursive ASQ query:

code: Set results = DAO.Apply("$..valueQuantity.value")

case 2: Suppose a JSON object contains nested product information and you need to extract all the price values regardless of their depth. With recursive search in ASQ, this can be achieved effortlessly:
code: Write DAO.apply("$..price")

This expression recursively searches the entire JSON structure and returns all values associated with the price key, simplifying what would otherwise be a complex parsing task.

  • ADMIN RESPONSE
    Aug 4, 2025

    Thank you for submitting the idea. The status has been changed to "Needs review".

    Stay tuned!