I assume that this portion indicates the current active layer ID number and doesnt work with another layer item as I guess that another layer item will have a different ID number.
{
“_ref”: “layer”,
“_id”: 32
},
By changing it to the folllowing does appear to to work.
You’re close to the solution, but itemIndex is a property of the Layer Descriptor and you can’t target specific properties inside a reference. That would be as if you’d say “Select the layer that has opacity 50%”.
You can target a property, but it will be nested inside it’s own object inside the _target array, for example:
(This would get the itemIndex of the selected layer).
However, what you want is to specify the layer reference. For references, there are a handful of keywords that you can use, such as _name, _index or _id. (example)
Thanks @Pierre_G thats going to help me move forward.
On a side note, what editor do you like.
I am using a Mac and trying a few at the moment, Visual Studio Code, Atom and Sublime text