Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature: array & objects are difficult to handle

Open
#33 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

The issue names no files, tests, or entry points; start by locating the template-syntax evaluator and its handling of arrays and objects. Reproduce the provided labels selector example, then define whether completion means filtering array data by index without registering custom functions.

Written by the indexing model from the issue text.

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.

Dominant language
TypeScript
Stars
26
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from antvis/expr

All issues in antvis/expr

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.