JXA is just the interface to AppleEvents. The language is JavaScript. whose
belongs to JXA, filter
to JS. Good job with demonstrating the advantage of the former over the latter here!
Depending on how often you call this script, performance might matter. If you use it only once in a while, it’s probably irrelevant.
One could perhaps cram the locations into an object with the tag names as key. I don’t know if that would change anything performancewise, though.
↧
Most efficient way to get all nested tags (JXA)
↧