0

How to access answer of specific question_id (32932554) of each attendee in java:

The working python version:

        for attendee in json_string['attendees']:
        for section in attendee["answers"]:
            question = section["question_id"];
            if question == "32932554":
                answer = section["answer"].strip();

How would I do this in Java as the data is coming from an api which returns a json file but I can't filter the file I just get the whole json back?

Avery
  • 1
  • 1
  • On StackOverflow, you are supposed to show what you have tried so far to solve your problem. It is also nice to provide a [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). Finally, it seems what you are trying to do is get only a specific part out of a JSON object, so maybe this answers your question : [How to parse JSON in Java](https://stackoverflow.com/q/2591098/11384184) ? – Lenormju Jan 26 '22 at 10:34

0 Answers0