title: Find index of element in a JSONArray
body: <p>I receive a JSONObject from server that is as follows:</p>
  
  <pre><code>{
     "opOutput":{
        "DISPLAY_VALUES":[
           "Acceptance",
           "Arrive Load Port",
           "Arrive Receipt Point",
           "Arrive Relay Port",
           "Arrive Terminal",
           "Arrived at Delivery Location",
           "Arrived at Pickup Location",
           "Arrived Intermodal Train",
           "At Customs",
           .
           .
           .
           .  
  
  
        ],
        "VALUES":[
           "ACCPT",
           "ALPT",
           "ARRP",
           "ARREL",
           "ATRM",
           "QARD",
           "ARPUL",
           "AIMTRN",
           "K",
           .
           .
           .
           .
        ]
     },
     "_returnValue":{
        "TX_TYPE":"SHIPMENT",
        "__DeltaStatus":2,
        "ORG_CODE":"GFM",
        "TX_ID":"11019082"
     },
     "_returnType":"SUCCESS"
  }
  </code></pre>
  
  <p>Now I need to get the display value for s String s that is equal to one of the values.
  i.e I have string "ACCPT" and i need to get "Acceptance" from the JSONObject.</p>
  
  <p>I've made two JSONArrays with DISPLAY_VALUES and VALUES
  with </p>
  
  <pre><code>JSONObject opoutput=shipmentcodes.getJSONObject("opOutput");
  JSONArray event_values=opoutput.getJSONArray("DISPLAY_VALUES");
  JSONArray event_codes=opoutput.getJSONArray("VALUES");
  </code></pre>
  
  <p>where shipmentcodes is the original JSONObject, but I'm unsure about how to proceed further. Any tips?</p>