Hi,
currently working on a vega viz and right now i'm stuck on how to proceed...
My use case is to be able to lookup on an index where one field of a given document is an array of json.
Have a look of the code below:
{
"$schema": "https://vega.github.io/schema/vega/v3.json",
"width": 960,
"height": 500,
"autosize": "none",
"data": [
{
"name": "data1",
"values": [
{
"list": [
{"id": 1, "text": "ok1"},
{"id": 2, "text": "ok2"},
{"id": 3, "text": "ok3"}
]
}
],
"format": { "property": "list" },
"transform": [
]
},
{
"name": "data2",
"values": [
{"trackId": 1, "ok": 1},
{"trackId": 2, "ok": 2},
{"trackId": 3, "ok": 3}
],
"transform": [
{
"type": "lookup",
"from": "data1",
"key": "list.id",
"fields": ["trackId"],
"as": ["obj"]
}
]
}
]
}