Read and parse json file in Photoshop script (javascript)
Hi everybody,
I have to export psd layers to files and I managed to automate the related 'save as' process with a simple script. Depending on its name, each layer is saved as a new file in the right folder, and the whole thing works pretty fine.
In order to make it work within different projects and with different naming conventions, I thought to make the script read sort of a database file - i.e. a json file - containing the destination folder path and the naming rules. So that I can easily customize the db file instead of looking through the whole script and find/replace things.
Unfortunately I didn't succeed in parsing the json file: this is a little beyond my knowledge. I tried to make some tests following the accurate and useful instructions found in other threads, but I'm not skilled enough to understand what I'm doing wrong.
Could anybody help me with a more dummy-proof explanation of how to correctly edit and parse a json file in javascript?
Thank you in advance!