Under Review
Last Updated: 16 Jul 2024 11:04 by ADMIN
Daniel
Created on: 10 Jul 2024 05:32
Type: Feature Request
0
JsonDataSource accessing nested objects

Hello

I see a design issue using JsonDataSource and possible nested objects/arrays and providing data in runtime.

 

Setting up a "root" JsonDataSource is no problem. Also the way setting the json trough parameters.

 

The issue begins when I want to use a nested array AND the root object. 

Example Json
{
"InvoiceDate" :  "2024-01-01",
"InvoiceNo":"IN2024-001",
"Positions" : [
{
"Product":"Product 1",
"Price" : 5.25
},
{
"Product":"Product 2",
"Price" : 10.5
}
]
}

The approach using JsonPath for accessing the "Positions" is ok but I have to set up another JsonDataSource with the same json and so that I can access the nested array. 

And now I don't now how to set the Source of the second JsonDataSource in runtime. Setting it using parameters is only possible with one DataSource.

A nice approach would be binding the Source of the second JsonDataSource to the first JsonDataSource with a JsonPath. So we could avoid duplication of data.

Or let us bind to a nested object in a table.

 

1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 16 Jul 2024 11:04

Hello, Daniel,

Thank you for bringing this to our attention. We will review the item, discuss with the team what are the possible options we can offer our clients and update the public status accordingly.

Meanwhile, I am sharing with you useful resources that explain in details how to create a report that displays hierarchical nested data:

How to Create a Report that Displays Hierarchical Nested Data

Using JSONPath to Filter JSON data

I believe that it would be applicable for the scenario you need to cover.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.