Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ravi_Rajagopal
Contributor III
Contributor III

JSON response issue

I have students data from a "getStudents" API call assembled together in a tHashInput component which has 2 students data. I don't know how to create the following output  I have included a word document that has a snapshot of the code. 

Note: The schema shown in the attached document might look different than the data provided below. Due to data-privacy I have removed the original content. 

{
    "total": "2",
    "limit": 10,
    "offset": 0,
    "students": [
        {
            "id": 1,
            "first_name": "AAA",
            "last_name": "BBB"
        },
        {
            "id": 2,
            "first_name": "YYY",
            "last_name": "ZZZ"
        }
    ]
}
 
Labels (4)
1 Reply
Shicong_Hong
Employee
Employee

Hello

You need to set the attribute of 'students' element as 'array', see the configuration of JSON tree as below.

2024-03-13_11-00-47.png

It will generate a Json string like this:

{"total":"2","students":[{"id":"1","firstname":"AAA","lastname":"BBB"},{"id":"2","firstname":"CCC","lastname":"DDD"}]}

Please try it and let me know if it works. 

Regards

Shicong