Forum Discussion

SysLostInBI's avatar
SysLostInBI
Frequent Visitor
6 years ago
Solved

Working with JSON and multiple List

I'm sure this is a very basic question, so I feel bad bothering you with this.

But I'm stuck with this.

 

I have imported a JSON file:

{
    "result": [
        {
            "metricId""xx",
            "data": [
                {
                    "dimensions": [
                        "APPLICATION-aa",
                        "SATISFIED"
                    ],
                    "timestamps": [
                        1585872000000,
                        1586044800000
                    ],
                    "values": [
                        241,
                        1067
                    ]
                },
                {
                    "dimensions": [
                        "APPLICATION-bb",
                        "FRUSTRATED"
                    ],
                    "timestamps": [
                        1585872000000,
                        1586044800000
                    ],
                    "values": [
                        172,
                        771
                    ]
                }
            ]
        }
    ]
}

After 

  • Converting to table
  • Transpose table
  • Promote Header (& Change Type)
  • Expand the Result
  • Expand result.data
  • Expand result.data

My imported data has become:

 

 Now my next step is to "Extract Values" from result.data.dimension while adding a delimiter and then split the table by delimiter.

The next step would be to expand the list of result.data.timestamps together with the result.data.values.
Which should give me something like:

result.metricIDresult.data.dimension.1result.data.dimension.2result.data.timestampsresult.data.values
xxApplication-aaSATISFIED1.58587E+12241
xxApplication-aaSATISFIED1.58604E+121067
xxApplication-bbFRUSTRATED1.58587E+12172
xxApplication-bbFRUSTRATED1.58604E+12771

 

Thanks for your help!

5 Replies