Open
Description
When i write some demo for expr
, i meet a problem:
If you don't use register
to define your own functions and only use template syntax, it is difficult to handle arrays
and objects
.Here is an example:
const spec = {
type: 'line',
height: 400,
width: 540,
legend: false,
y: 300,
encode: {
x: 'name',
y: 'value'
},
scale: {
y: {
independent: true
}
},
labels: [{
text: '{a.value}',
// here is the problem, how to filter this array 🤔
selector: '{a}',
}, ],
axis: {
y: {
position: 'right',
grid: null,
},
},
},
}
I want to filter only the data of a certain index in the labels
selector
, but it is difficult to handle using only template syntax.
Metadata
Metadata
Assignees
Labels
No labels