title: Parsing unnamed nested arrays with minimal-json?
body: <p>So I'm working on a fairly simple Java program which grabs market data from cryptocurrency exchanges and displays information to the user. I am using the minimal-json library.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>public class Market {
      static JsonArray arrayBittrex;
  
      public static void startTimer(){
          Timer timer = new Timer();
          timer.scheduleAtFixedRate(new TimerTask() {
              @Override
              public void run() {
                  String url = "https://bittrex.com/api/v1.1/public/getmarketsummaries";
                  try {
                      URL url2 = new URL(url);
                      URLConnection con = url2.openConnection();
                      InputStream in = con.getInputStream();
                      String encoding = "UTF-8";
                      String body = IOUtils.toString(in, encoding);
                      arrayBittrex = Json.parse(body).asObject().get("result").asArray();
                  }
                  catch(MalformedURLException e) {}
                  catch(IOException e) {}
              }
          }, 0,5000);
      }
  
      public static float getPrice(String exchange, String market) {
          for (JsonValue item : arrayBittrex) {
              float last = item.asObject().getFloat("Last", 0);
              System.out.println(last);
              return last;
          }
          return 0;
      }
  }
  </code></pre>
  
  <p>This code works with simple json, for example (from <a href="https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-ltc" rel="nofollow noreferrer">https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-ltc</a>):</p>
  
  <pre><code>{
      "success" : true,
      "message" : "",
      "result" : [{
              "MarketName" : "BTC-LTC",
              "High" : 0.01350000,
              "Low" : 0.01200000,
              "Volume" : 3833.97619253,
              "Last" : 0.01349998
          }
      ]
  }
  </code></pre>
  
  <p>It will properly return the "Last" value in the array.
  However, this cant work when the json has multiple arrays (like in <a href="https://bittrex.com/api/v1.1/public/getmarketsummaries" rel="nofollow noreferrer">https://bittrex.com/api/v1.1/public/getmarketsummaries</a>):</p>
  
  <pre><code>{
      "success" : true,
      "message" : "",
      "result" : [{
              "MarketName" : "BTC-888",
              "High" : 0.00000919,
              "Low" : 0.00000820,
              "Volume" : 74339.61396015,
              "Last" : 0.00000820
          }, {
              "MarketName" : "BTC-A3C",
              "High" : 0.00000072,
              "Low" : 0.00000001,
              "Volume" : 166340678.42280999,
              "Last" : 0.00000005
          }
      ]
  }
  </code></pre>
  
  <p>So my question is: how can I get the "Last" value by searching for the array by the "MarketName" value?</p>