Shortcuts Newbie. Using shortcuts I am creating various lists and calendars and reminders using the repeat loop.
I would like to capture the results in a json key value pair list
What is the best way to get this going?
– do I use the dictionary to create a json “shell” first before the repeat loop
- and then in the middle of the repeat loop would I add the particular record data to the Dictionary or something like that?
I tried this:
-
create dictionary with a few key value pairs (as place holders like title and moddate etc)
-
found reminders
-
started repeat loop
-
got values from repeat item
-
NEXT GOAL is to add a new row into the json dictionary with the various reminder fields
-
TRIED THIS NEXT:
set title (dictionary key) to Title in Dictionary
(thinking it might ADD new record row with the title into the dictionary - but it did not )
- can you help with the correct way to do this?
Thanks - dave
I’m not entirely sure this is what you are trying to accomplish, but the following may help… — jay
First of all - thanks you very much jaylevy for your assistance. Your shortcut was helpful.
I guess I didn’t explain myself as well as I should have.
I would like to create a JSON Array with the JSON Objects inside made up of the individual reminders records like:
[
{"Title":"data", "Priority":"data", "List":"data", "Due Date":"data" },
{"Title":"data", "Priority":"data", "List":"data", "Due Date":"data" },
{"Title":"data", "Priority":"data", "List":"data", "Due Date":"data" },
{"Title":"data", "Priority":"data", "List":"data", "Due Date":"data" },
More records - etc...
]
My goal here is to get all these reminders that I want in one big text json array - then I can manage this later in my database…
I hope I have explained this more clearly - thanks Dave
See if this gives you an idea of how to populate a set of JSON that can be converted to a dictionary object?
Thanks so much - I will give it a try
YES YES YES sylumer - that is EXACTLY what I was hoping for - THANK YOU!
Thank you so much sylumer for getting me started with this great json shortcut demo. It worked perfectly. From your starter shortcut, I was able to create a full shortcut that could export all the reminder fields based on my record selection criteria.
Next, it created a new Apple note with the full json text. From there, I was able to manually paste it into my database (Filemaker) and parse through all of the json reminder record objects and end up with a full Reminders database back up.
Now, I can safely delete all the old archive reminder tasks.
For me, I have been wanting to do this for quite some time. Thanks to you, it is finally working!
I would be happy to share my shortcut with a forum in case anybody is interested. Can you let me know the process of how I would export and share my shortcut?
Thanks - Dave
1 Like
To share a shortcut on the forum.
- Open your shortcut.
- Duplicate and sanitise any content if required - i.e don’t post any shortcuts with data in that you wouldn’t want to be public knowledge.
- Tap on the share button.
- Select Copy iCloud Link and wait for the message to say that the link has been copied to the clipboard.
- In your forum post paste the link on its own line. The forum will then include a link to the download page for the shortcut.
Thanks again for the help. I will get the shortcut up soon.