title: SparkSQL sql syntax for nth item in array
body: <p>I have a json object that has an unfortunate combination of nesting and arrays. So its not totally obvious how to query it with spark sql.</p>
  
  <p>here is a sample object:</p>
  
  <pre><code>{
    stuff: [
      {a:1,b:2,c:3}
    ]
  }
  </code></pre>
  
  <p>so, in javascript, to get the value for <code>c</code>, I'd write <code>myData.stuff[0].c</code></p>
  
  <p>And in my spark sql query, if that array wasn't there, I'd be able to use dot notation:</p>
  
  <pre><code>SELECT stuff.c FROM blah
  </code></pre>
  
  <p>but I can't, because the innermost object is wrapped in an array.</p>
  
  <p>I've tried:</p>
  
  <pre><code>SELECT stuff.0.c FROM blah // FAIL
  SELECT stuff.[0].c FROM blah // FAIL
  </code></pre>
  
  <p>So, what is the magical way to select that data? or is that even supported yet?</p>