Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have just tried this and it works. Are you doing something similar?</p> <pre><code>JSONArray array = null; String num = ""; try { array = new JSONArray("[{\"0\":\"500\",\"post_id\":\"500\",\"1\":\"Ps-2\",\"post_title\":\"Ps-2\",\"2\":\"Ps-2 in new condition. used only for 15 to 20 times.\\n3 dvd's will also be given freely.\\nthis all for a nominal price\",\"post_des\":\"Ps-2 in new condition. used only for 15 to 20 times.\\n3 dvd's will also be given freely.\\nthis all for a nominal price\",\"3\":\"2013-02-16 04:02:24\",\"post_date\":\"2013-02-16 04:02:24\",\"4\":\"2013-02-16 04:02:24\",\"edit_date\":\"2013-02-16 04:02:24\",\"5\":\"1\",\"post_status\":\"1\",\"6\":\"5\",\"user_id\":\"5\",\"7\":\"0\",\"featuered\":\"0\",\"8\":\"11\",\"sub_cat_id\":\"11\",\"9\":\"1\",\"cat_id\":\"1\",\"10\":\"7500\",\"post_price\":\"7500\",\"11\":\".\\/uploads\\/lmf-classifieds-pk\\/folder1\\/2013-02-16\\/500\\/1361014226-ps-2-lmf-com-pk.jpg\",\"post_img\":\".\\/uploads\\/lmf-classifieds-pk\\/folder1\\/2013-02-16\\/500\\/1361014226-ps-2-lmf-com-pk.jpg\",\"12\":\"1\",\"post_country_id\":\"1\",\"13\":\"7\",\"post_state_id\":\"7\",\"14\":\"92\",\"post_city_id\":\"92\",\"15\":\"olx\",\"post_ref\":\"olx\",\"16\":\"03335525488\",\"number\":\"03335525488\",\"17\":\"7\",\"state_id\":\"7\",\"18\":\"Punjab\",\"state_title\":\"Punjab\",\"19\":\"Punjab\",\"state_des\":\"Punjab\",\"20\":\"1\",\"state_status\":\"1\",\"21\":\"1\",\"country_id\":\"1\",\"22\":\"populer\",\"state_type\":\"populer\",\"23\":\"92\",\"city_id\":\"92\",\"24\":\"Rawalpindi\",\"city_title\":\"Rawalpindi\",\"25\":\"Rawalpindi\",\"city_des\":\"Rawalpindi\",\"26\":\"1\",\"city_status\":\"1\",\"27\":\"7\",\"28\":\"populer\",\"city_type\":\"populer\",\"29\":\"populer\",\"is_important\":\"populer\",\"30\":\"16-February-2013\",\"p_date\":\"16-February-2013\",\"image1\":\"..\\/uploads\\/lmf-classifieds-pk\\/folder1\\/2013-02-16\\/500\\/1361014226-ps-2-lmf-com-pk.jpg\",\"image2\":\"..\\/uploads\\/lmf-classifieds-pk\\/folder1\\/2013-02-16\\/500\\/1361014225-ps-2-lmf-com-pk.jpg\"}]\n"); JSONObject row = array.getJSONObject(0); if(row.has("number")) { num = row.getString("number"); } } catch (JSONException e) { } Toast.makeText(this, num, Toast.LENGTH_LONG); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload