1

Use key/index from JSON source as value in charts/data

Currently to use the indexes from a JSON feed as values/labels for your graphs you have to write crazy complicated JOIN/MAP/CONCAT functions. Given the JOSN-object {[ foo: 6, bar: 4]} it would be epic to simply be able to display this using graphs where the index was the label/group. I.e. one column 6 high for "foo" and another 4 high for "bar", or a pie chart with 60% "foo" and 40% "bar". Would make working with feeds where the index is the denominator a LOT easier, like dated indexes or arrays of occurrences of items in groups etc.

3 comments

  • 0
    Avatar
    Jan Hansen

    +1

  • 0
    Avatar
    Stephen Yates

    We are working towards improving this and this feedback is helpful. It would be great if you could share a screen shot or video to see exactly what you are trying to do and what is happening. I would also be happy to have a call to walk through the scenario.

    Thank you

     

  • 0
    Avatar
    Jan Hansen

    I am trying to get the String of a key in a json file to display them in a table clip. As you can see the json structure is like:

    {
       "total":{
          "lines":{
             "total":907,
             "covered":314,
             "skipped":0,
             "pct":34.62
          },
          "statements":{
             "total":914,
             "covered":316,
             "skipped":0,
             "pct":34.57
          },
          "functions":{
             "total":129,
             "covered":38,
             "skipped":0,
             "pct":29.46
          },
          "branches":{
             "total":280,
             "covered":54,
             "skipped":0,
             "pct":19.29
          }
       },
       "/here/is/some/filename.js":{
            ...
       }
    }

    I can extract the values like "34.62"  without any Problem using a query like "/*/lines/pct". But I cannot the the string of specific keys. In my example I like to get the String "total" and "/here/is/some/filename.js" to display in a column.

     

    Thx for any advice.

Please sign in to leave a comment.