Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
matKa
Contributor III
Contributor III

How to restructure JSON so that it'll be easy to load it through Rest Connector?

I have Web Api that generates JSON with such structure:

{
    "City1": {
        "Category1": [
         {
               "Name": "Name1",
               "MonththlyValue": [ 4,2,1,3,3,2,3,2,1,4,2,5],
               "Target": 2
         },

        "Category2": [
         {
               "Name": "Name2",
               "MonththlyValue": [ 4,2,1,3,3,2,3,2,1,4,2,5],
               "Target": 3
         },

         ...

    }, 

    "City2": {
        "Category1": [
         {
               "Name": "Name1",
               "MonththlyValue": [ 4,2,1,3,3,2,3,2,1,4,2,5],
               "Target": 2
         },

        "Category2": [
         {
               "Name": "Name2",
               "MonththlyValue": [ 4,2,1,3,3,2,3,2,1,4,2,5],
               "Target": 3
         },

         ...

    },

    ...

}

 

JSON has information about each city, each category in this city and each value for that category spread among 12 months.

I've read on this forum that such nested JSON files are not feasable to work with. I have the ability to modify the way how this JSON is structured. So my question is how would you recommend to restructure this JSON so that it will be easy to make dashboards?

Should this be restructured in a such way that it only consists of flat objects with extra keys in them describing Cities and Categories? Should each object be splitted into 12 different ones for each month?

 

Labels (1)
0 Replies