Obtaining Property references from a list of strings?

The vertical bar is also used if the key include space. In whose cases I use instead objective-c name syntax there first word is lower case and all other capitalized.

While that might be possible using the ObjC bridge, it’s probably not very nice, either.
Personally, I try to avoid AppleScript since it’s so old and sub-par compared to current languages. But if you’ve already written smarting large in it, there’s no point in changing.

The biggest problem with JXA, Apple never made any documentation how to use it or any reference. So its more of guessing or trying to see what’s happen. And if any error happen no error returns for debugging. Specially if you like to include ObjC framework in your JavaScript.
That is not the same for AppleScript and AppleScriptObjC.

Better approach I think would be to use Node.JS and do RPC calls to AppleScript if the main function of the code in JavaScript. At least I have a better way to debug my JavaScript.

Oh, they did. But it’s even worse than the usual documentation they provide.

Well, if an error occurs, you get a message. Much like with AS. But you’re right, there’s no debugging possibility except for console.log.

Or using node_automation in node.js, which has seemingly a better integration with the OSA than JXA does.