title: Read JSON multi-dimensional array in Java
body: <p>I have an issue I haven't been able to find a solution to, because it's not quite straight forward I guess...</p>
  
  <p>In my Java program, I receive a string like this (from an existing source, I can't change it, sadly): </p>
  
  <p><code>["a", 1, "b", 2, ["c", "d", 3], 4]</code></p>
  
  <p>This string is a valid JSON array (no object, so no key/value pairs!). The content of the array may be totally random (for instance, empty) but can also be multi-dimensional.</p>
  
  <p>I need to find a way to read this in Java. For instance, <code>input.get(4).get(2)</code> should give me <code>3</code> in the above example. I don't really care if everything is casted to a string, but I need to find a way to reach the data through indices. Data may also be multiple characters, although my example shows only 1 per element.</p>
  
  <p>How do I accomplish this? Thanks in advance!</p>
  
  <p>Edit; I do know how many elements I expect in the root array, but there are a few dozen cases so I really don't want to program something different for each case</p>