0

While entering values in a registration form that dynamic values should be taken in JSON format and have sent those values to DB.

Can anyone help how to get the dynamic data values in JSON format in RegistrationForm?

Thanks in advance.

1

1 Answer 1

0

Try this my friend get dynamic key and value

try
{
    JSONObject jsonObject = new JSONObject(response);
    Iterator<String> keys = jsonObject.keys();
    while (keys.hasNext()) {
        String key = keys.next();
        String value = jsonObject.getString(key);
        Log.v("**********", "**********");
        Log.v("category key", key);
        Log.v("category value", value);

    }
}
catch(Exception e)
{
    e.printStackTrace();
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.