I just found out about this by trying it out and thought wow, FINALLY!
Let’s say I have a method that returns an array. Example below:
As you can see, a very simple example. So now, in my code outside my method I want to be able to access let’s say item number 3 from the method call and the key called awesomeLevel from the structure call. Then I can do this:
item3 = getArray()[3];
MyAwesomeLevel = getStruct()['awesomeLevel'];
How cool is that, finally!! Array syntax from method calls.


Now that is cool. I’m curious how long it will take adobe to implement that.
That *is* awesome. Yeah, Adobe has to upgrade the way they handle some compile time stuff.
I’ve noticed that you can use dot notation to get struct key values from a method call in CF (example: getStruct().awesomeLevel), but it’s a no-go with bracket notation, like with Railo
It makes perfect sense. I’ve not yet had a use for something like this, but, I am suprised it was not implemented by the other engines before.
That’s sorta / kinda confusing (parens then square brackets) but definitely useful if you know it’s there.
I find myself using similar syntax in javascript:
id = myString.split(‘_’)[1];