0

I got a JSON object in Cursor as follows

{
        "field1": "val1",
        "field2": [
            {
                "field3": "val3"
            },
            {
                "field4": "val4"
            }
        ]
}  

I'm able to access the feild1 and its value. How to access field3 and its value?
I tried the following code but not working

System.out.println(cursor.next().get("field2.field3"));  

Getting null as output.

1 Answer 1

1

Try this.Hope this will help.

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.