As it stands right now, there is no way to access the Key Object as you can in the UI. You could do stuff like using z-order to reorder the array.
put an identifier on it. //name, special fillColor, opacitu value, etc
or select it before run your script, find it with doc.selection