How can I access data without column?

I made simple example to help you understand my situation.

There are 3 properties in data.
{
  id: string,
  min: number,
  max: number,
}


And I want to show 2 columns:
["id", "percent"]


It might be simple, but I couldn't find a way to implement it with 2 columns.

If I register min and max to columns, it works fine but is it the best way?
const columns = [
  helper.accessor("id",{}),
  helper.accessor("min",{}),
  helper.accessor("max",{}),
  helper.display({
    id:"percent",
    header:"percent",
    cell: (ctx)=>ctx.row.getValue("min") / ctx.row.getValue("max") * 100
  })
]
Was this page helpful?