title: How can i parse JsonArray from jsp to Javascript
body: <p>Here is my code : </p>
  
  <p>Display.jsp:</p>
  
  <pre><code>    &lt;%
      JSONArray jsonArray = new JSONArray();
      String location = request.getParameter("location");
      Class.forName(OracleDriver.class.getName().toString());
      Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ram","ram");
      PreparedStatement preparedStatement = connection.prepareStatement("select * from job where location = ?");
      preparedStatement.setString(1,location);
      ResultSet resultSet = preparedStatement.executeQuery();
      int index = 0;
      if(!resultSet.next()){
              jsonArray.add(0, new Job("NA","NA","NA","NA","NA"));
              out.println(jsonArray);
      }else{
          while(resultSet.next()){
              index ++;
              Job job = new Job(resultSet.getString("title"),resultSet.getString("location"),resultSet.getString("eligibility"),resultSet.getString("position"),resultSet.getString("pdate"));
              jsonArray.add(index, job);
          }
          out.println(jsonArray);
      }
  
  %&gt;
  </code></pre>
  
  <p>jsonArray containing list of Job objects,
  How can i parse <code>jsonArray</code> in javascript</p>
  
  <p>Any ideas...</p>