Marc Posted January 5 Share Posted January 5 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? Link to comment
vitor Posted January 5 Share Posted January 5 Click the (…) to the right of Alfred filters results and change Match Mode to one of the word matching options. Link to comment
Marc Posted January 5 Author Share Posted January 5 (edited) ah I have overlooked this option. But this seems to work only with words. What I would need is matching of substring in a word. Example: The items are: Hamburg Dresden Kreuzberg Bergheim … if i search for "berg" both Kreuzberg and Bergheim will be results shown in the list. Edited January 5 by Marc typo Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now