Adobe interview question

Fetch a 2-d array elements spirally.