I’ve created a shortcut that uses Data Jar to ease reading and writing to a JSON store. This is working pretty well, but I think it would be better in Drafts , because the prompts are more flexible (or maybe Scriptable? But I don’t think it has the support for prompts for user input out of the box). However, I am barely a novice with javascript and don’t know much about working with JSON. Everything I can find online is either bare man pages that assume more expertise than I have, or seems to assume some kind of Web / HTML usage that doesn’t apply here, where I just want to read/write values to keys, and also create new objects.
Here’s an example of the data:
{
"1": {
"creation date": "2019-12-24",
"name": "name 1",
"priority": {
"completion date": "",
"creation date": "2019-12-26",
"daily": [
{
"complete": "False",
"date": "2019-12-28",
"name": "not done"
}
],
"enough": [
{
"date": "2019-12-27",
"description": "Something",
"enough?": "true"
},
{
"date": "2019-12-27",
"description": "Nothing",
"enough?": "false"
}
],
"name": "name 1a"
}
},
"2": {
"creation date": "2019-12-24",
"name": "name 2",
"priority": {
"completion date": "",
"creation date": "2019-12-26",
"daily": [
{
"complete": "True",
"date": "2019-12-28",
"name": "done"
}
],
"enough": [
{
"date": "2019-12-27",
"description": "Nothing",
"enough?": false
},
{
"date": "2019-12-27",
"description": "Nothing",
"enough?": "false"
}
],
"name": "Name 2a"
}
},
Basically, on a daily basis, I want to read “name” keys and write new arrays to “enough”. and “daily”
Not looking for someone to take on this ambitious coding challenge, but any resources you think would be useful, I’d love to hear about them.