I have a list of JSON objects where I want to check if a title contains a substring entered in the Alfred prompt.
I tried to build it with an Alfred Script Filter (JSON format) using the autocomplete. But works only if the string starts with the query string.
What I need is to check if the substring is in (contains instead of starts with) the title.
Given the example item below if I search for "I want" this item should be a candidate for selection in the resultslist of the script filter.
{"items": [
{
"nr": "1",
"title": "The String I want to search in"
"subtitle": "",
"autocomplete": "The String I want to search in",
"arg": "",
"icon": {
"path": "images/a.png"
},
"variables": {
"id": "213",
"value1": "lorem",
"value2": "ipsum",
"notes": "sadasd sadsad. sdasd"
}
},
…
Is this possible with a Script Filter? If not how could I achieve it?