Continuing the discussion from Idea of multi field data tiddler like a data base:
I have a Tiddlywiki I use to make notes about decks I build playing Magic: the Gathering. I have a JSON file with data about the cards (card name, the card’s “cost” in-game, its card type, and a URI to an image of the card). The format of the JSON is an array of objects:
[
{
"name": "A Realm Reborn",
"image_uris.normal": "https://cards.scryfall.io/normal/front/d/1/d1af74e4-38d5-44b5-85e1-4d13f6970453.jpg?1748706495",
"mana_cost": "{4}{G}{G}",
"type_line": "Enchantment",
"legalities.commander": "legal",
"set_name": "Final Fantasy"
},
{
"name": "A Tale for the Ages",
"image_uris.normal": "https://cards.scryfall.io/normal/front/c/a/ca0c8d3b-ce30-4da5-a6a8-9bdcb3c757f9.jpg?1692941043",
"mana_cost": "{1}{W}",
"type_line": "Enchantment",
"legalities.commander": "legal",
"set_name": "Wilds of Eldraine"
},
{
"name": "Aarakocra Sneak",
"image_uris.normal": "https://cards.scryfall.io/normal/front/2/a/2a83882c-3e03-4e85-aaac-97fa1d08a772.jpg?1722040128",
"mana_cost": "{3}{U}",
"type_line": "Creature — Bird Rogue",
"legalities.commander": "legal",
"set_name": "Commander Legends: Battle for Baldur's Gate"
}
]
I’ve only shown 4 cards of data but the total list is 29,000 cards (!!), far more than I think would be reasonable to create static tiddlers for (but maybe I’m wrong). I’d like to be able to query these objects by the “name” field in order to auto-complete a list of card names in tiddlers I’m editing. However, all the JSON examples I can find assume a single object. In the Tiddlywiki documentation and Grok Tiddly wiki, there are no examples showing how to search or filter an array of similar objects based on the value of a particular field. Is this possible without building my own plugin?
Eventually I want to setup some shadow tiddlers based on this data so I can get info on the card by name, but for now auto-completing would be sufficient.
My wiki is here and the data tiddler is MtgCards. The Auto Complete Plug-in config is in the Evidently Cube tab in $/ControlPanel.