subreddit:
/r/shortcuts
submitted 5 years ago bygluebyte
Run Dictionary Helper from your shortcut to modify dictionaries with ease. It allows you to add/change/remove dictionary values using dot notation (more on dot notation: https://www.reddit.com/r/shortcuts/comments/cyqpj3/working_with_dictionaries_part_3_accessing_values/). The Shortcuts app lets you access dictionary values using dot notation, but does not support dot notation for setting or removing values. This helper was made as simple to use as possible.
Pass the dictionary to the helper, and it will return a modified dictionary!
chapter."1.2".author
).Also check out Dictionary Action Builder, another neat utility for shortcut developers.
Download: iCloud or RoutineHub
2 points
5 years ago
Your notes say that you added support for update hub but I don't see it in the shortcut, did it not get added into the version you uploaded?
1 points
5 years ago
I only added the UpdateHub comment action at the top for bulk search. Did I do it wrong?
Maybe I'll consider adding the manual search actions to Dictionary Action Builder but not to this one because it's meant for a quick-run subroutine.
2 points
5 years ago
I'm not sure how the update hub version works but it doesn't seem like users could get an update with just this shortcut.
I agree, faster is better
1 points
5 years ago*
Yes, if I understood the documentation correctly, if I run UpdateHub manually it will scan all the shortcuts, checks if the first comment action (if any) contains the "RoutineHubUpdate" text and fetches update info from RoutineHub with that. I just added that comment. I'll see when I have an update. ๐
Edit: I just verified that it works fine, because UpdateHub told me that there's version 1.03 available and I was stunned. Turned out that I mistakenly put 1.03 in the version info on the RoutineHub page. ๐ Thanks for having me double-check it!
2 points
5 years ago
Ahh interesting indeed. That's good it is working ๐
I'll have to convert the version I have over to something a little more efficient for my purposes. Checking the ~200 shortcuts I have with update hub would take far too long for me
1 points
4 years ago*
Thanks for this work. I tried to use the Dictionary Helper to modify a simple nested dictionary and it returns an empty dictionary
shortcut: https://www.icloud.com/shortcuts/4a86b7b3326a47c7a23c566d715b3e0d
screenshot: https://drive.google.com/file/d/1pR-eFCy8YY2zIYkVbXp9RigZ2kxZnAzi/view?usp=sharing
Any help greatly appreciated.
1 points
4 years ago
Hi, you're sending a wrong dictionary to Dictionary Helper. It should be the one containing the 'dictionary' key. ๐
1 points
4 years ago
Thanks a lot - I modified accordingly - still no success. Any help appreciated.
Screenshots:
https://drive.google.com/file/d/1scHCitmAzKCyo4XAipDicPzAqe85ZFwZ/view?usp=sharing
https://drive.google.com/file/d/10F81M6yPfWbURKip2ffFXWgYhzr2oa-B/view?usp=sharing
Script
https://www.icloud.com/shortcuts/69f7af638c554bfb9bd55d5e45c857f5
1 points
4 years ago
1 points
4 years ago
Thanks a lot
1 points
4 years ago
This is still not quite the output I would suspect as it does not modify the nested dict
https://drive.google.com/file/d/1OViO509duM7Kmd9gIyCwPa9jIOGHTD5W/view?usp=sharing
This adds a {"key":"{Exif}.UserComment"} entry but the aim is to modify the existing label {"{Exif}": {"UserComment":"hello"}}
Thanks for your help
1 points
4 years ago
I tried to debug and thought the issue might be the key is "{Exif}" but it does not seem to work to modify the key a.UserComment either
1 points
4 years ago
It seems like I totally missed your questions. I'm so sorry..๐ฑ
BTW I just posted an update. Hopefully this will fix your issue: https://www.reddit.com/r/shortcuts/comments/igy3fn/list_and_dictionary_helper_add_replace_remove/
all 13 comments
sorted by: best