TanStackT
TanStack3y ago
4 replies
faint-white

Filtering Arrays

Hello, I have data that looks like the example below. Using Cell, I can return a map of the data to display each of the tag names separately but for I can't figure out how to filter against that information.

example column:
{
accessorFn: row => row.tag,
header: "tags",
cell: cell => {
const tags = cell.row.original.tags;
return (
tags.map((tag) => {
return (tag.name)
})
)
}
}

example data:
{
id: 'some id'
title : 'some title',
description : 'some description',
tags: [
{
id: 'some id',
name: 'some tag name'
},
{
id: 'some other id',
name: 'some other name'
}
]
}
Was this page helpful?