Nested Variables or Variables Inside Variables Requested

You can have arrays with the execute script command:

In this example we first create the array “a” and then access the 2nd element:

{
  "Name": "array",
  "CreationDate": "2019-10-19",
  "Commands": [
    {
      "Command": "executeScript_Sandbox",
      "Target": "return new Array ('cat','dog','fish','dog','deer','frog','whale','dog','seal','horse','elephant')",
      "Value": "a"
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return ${a}[2];",
      "Value": "var"
    },
    {
      "Command": "echo",
      "Target": "var=${var}",
      "Value": ""
    }
  ]
}
2 Likes