Finding Data Jar Paths

Hi all!

I’ve built a Data Jar-based system for tracking a bunch of data points through Shortcuts, and I’m hoping to get some help in writing future Shortcuts to analyze it.

Let’s say the structure looks like this:

  • Root
    • Branch 1
      • Key 1: 5
      • Key 2: 3
      • Key 3: 5
    • Branch 2
      • Key 1: 3
      • Key 2: 0
      • Key 3: 7
    • Branch 3
      • Key 1: 1
      • Key 2: 5
      • Key 3: 9

I’d like to be able to look for the value of 5, and understand what Keys have that value, and to which Branches those keys belong.

Do folks have a good working strategy approach for this?

Thanks so much!

ScottyJ

Here is a brute force approach that will traverse the whole dictionary structure looking for the value. If the dictionary is reasonably sized, this may work for you or serve as a starting point.

https://www.icloud.com/shortcuts/16b363ef557646e7b5ecaaac9dba7d6d

Let me know if any questions — jay

1 Like

This is brilliant - thank you so much!