coddingtonbear / obsidian-csv-table

Have a CSV file you want to render some or all of the data from? This plugin allows you to display that data in your obsidian preview.
MIT License
113 stars 5 forks source link

Filter by element in array #34

Closed jerrygreen closed 7 months ago

jerrygreen commented 7 months ago

I have a table with cells acting pretty much like arrays ("Type" column):

Score Activity Type
99 Trading Hobby, Business, Guild, Quests
90 Apothecary Hobby, Quests
85 Herbalist Hobby, Quests

I would like to have a filter something like this:

filter: Type.includes('Hobby')

or like this:

filter: 'Hobby' in Type

I.e. not an exact match, but it should include the element.

jerrygreen commented 7 months ago

Just found out in README that this package is using filterx.

This library has somewhat close solution to this:

filter: Type ~= "Hobby"

While it's not comparing arrays and it's just text comparison, it's still kinda works – which is enough for me.

Btw, cool library! Even after all these years it still works, I guess its simplicity really shines in this regard.