0

So this is what i have

{"REQUEST_TYPE_SENT":"SERVICE_GET_CCAVENUE_KEY","order_id":"1"}

I want to put SERVICE_GET_CCAVENUE_KEY in a String,like wise "1" in a string,how can i achieve this,sorry i'm really noob in programming,i just started out

Edit:- so if ijust use JSONObject obj = new JSONObject(string),then obj.getString(order_id),would this work to get the order_id number ??

Any Help would be appreciated

Venky
  • 1,929
  • 3
  • 21
  • 36
  • Look at the top-voted answer on the linked duplicate. Make a `JSONObject` from that `String`, then use the `get*()` methods on that as needed. – Mike M. Apr 22 '17 at 04:44
  • so if ijust use JSONObject obj = new JSONObject(string),then obj.getString(order_id),would this work?? – Venky Apr 22 '17 at 04:46
  • Close: `obj.getString("order_id")`. – Mike M. Apr 22 '17 at 04:53

0 Answers0