In that case, I don't understand the interest of my function anymore, it will just mimick the saved searches features with a json in a slightly different form, and then
the proposal of Theducks applies. It's easy of course to modify the function, it's just adding a optional 3rd dim to the list for each element of the json, but you can do that as well with a json for saved searches and apply all searches at once.
If you don't want to mix those specific searches with your usual ones, you may either use a portable calibre for this specific task, or you may backup your different jsons of saved searches and "delete all saved searches + import the right json".
What do you think ? If you still want this feature, I'll adapt the function at night, but IMO the saved searches are exactly fitting you needs.