Undefined Value

I stored talent as ObjectId in MongoDB database. and I intend to convert it to name. but I get the value "undefined". is there anything to fix from the following code? cheers!

const columns = [
    {
      header: "Talent",
      accessorKey: "talent",
      cell: (talent) => talents[talent],
      footer: "talent",
    },
  ];
Was this page helpful?