title: Extract value using JSON Path from array
body: <p>I have Json like this below</p>
  
  <pre><code>{"pd":"{\"e\":{\"h\":{\"ak\":\"120\",\"at\":\"app\"},\"b\":[{\"ts\":1319549658547,\"tz\":-400,\"s\":\"StartUpScreen\",\"et\":8,\"ev\":\"sessionStart\",\"si\":\"19477682-de55-414f-82c9-19bec331dc33\",\"tt\":{\"day\":\"Tuesday\"}},{\"ts\":132,\"tz\":-400,\"s\":\"StartUpScreen\",\"et\":3,\"ev\":\"AutomaticFeedRefresh\",\"si\":\"19477682-de55-414f-82c9-19bec331dc33\",\"tt\":{}},{\"ts\":131,\"tz\":-400,\"s\":\"MainScreen\",\"et\":3,\"ev\":\"MainScreen Event\",\"si\":\"19477682-de55-414f-82c9-19bec331dc33\",\"tt\":{}}],\"tt\":{\"OSV\":\"7.10\"}}}","serverPayload":{"httpHeaders":{"x-bluecoat-via":["35D3468EFF4D5F18"],"content-type":["application\/x-www-form-urlencoded"]},"senderIp":["101.100.000.100"]}}
  </code></pre>
  
  <p>I just need the values of <code>ak</code>, <code>b [ts,si and tt[day]]</code> and <code>senderIp</code>.
  Now I have 2 questions, how do I extract all 'ts' attributes in 'b' and 'senderIp'. I have used the below code for ak, ts and si. I am not sure how I get 'tt', also while I run this code I get an exception like below</p>
  
  <pre><code>    String pd = JsonPath.read(jsonString, "$.pd");
      String ak = JsonPath.read(pd, "$e.h.ak");
      String ak = JsonPath.read(pd, "$e.h.b[0]");
  //    String b = JsonPath.read(pd,"$.e.b[0][0]");
  //    String b = JsonPath.read(pd,"$.e.b[0][5]");
      System.out.println("value of ak: "+ak);
  </code></pre>
  
  <p>Exception in thread "main"
  <code>java.lang.ClassCastException: net.minidev.json.JSONObject cannot be cast to java.lang.String</code>.</p>