how can i pass otp object from server to next activity
private void savedata (final String mob){
StringRequest request =new StringRequest(Request.Method.POST,urltechno, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject object=new JSONObject(response);
if ( object.names().get(0).equals("success")){
Toast.makeText(getApplicationContext(),"Successfully send request",Toast.LENGTH_LONG).show();
Intent intent = new Intent(getApplicationContext(), Otp_verification.class);
intent.putExtra("mobile",mob);
intent.putExtra("otp",object.getString("otp"));//in this section problem occured
startActivity(intent);
}else{
Toast.makeText(getApplicationContext(),"invalid number",Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}