Nested object in Vega lite

        {
          "key_as_string" : "2019-02-14T00:00:00.000Z",
          "key" : 1550303400050,
          "doc_count" : 5,
          "daily" : {
            "hits" : {
              "total" : {
                "value" : 5,
                "relation" : "eq"
              },
              "max_score" : null,
              "hits" : [
                {
                  "_index" : "recordedSpeed",
                  "_type" : "_doc",
                  "_id" : "12341::1231541412413::1231241579508",
                  "_score" : null,
                  "_source" : {
                    "Car" : "Volvo",
                    "speed" : 10.0
                  },
                  "sort" : [
                    10.0
                  ]
                }
              ]
            }
          }
        }

Hey!
Im creating a chart in vega-lite and my buckets return this.
I want to have speed on the y-axis and car on the x-axis.
I was hoping

daily.hits.hits._source.Car
daily.hits.hits._source.Speed

would give me what I wanted but it doesnt seem to work. Ive tried flattening the data but it doesn't appear to work either.

I also tried

{
"calculate": "datum["daily"]["hits"]["hits"]["source"]",
"as": "car"
}

Help would be appreciated!

@nyuriks - can you please help

Thanks
Rashmi

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.