How try like this,

 JSONArray msg = (JSONArray) jsonObject.get("list");

 for(int i = 0;i &lt; msg.length();i++ ) {
     JSONObject jsonObj = msg.getJSONObject(i);

     //now get id &amp; value
     int id = jsonObj.getInt("ID");
     String value = jsonObj.getString("value");

     if (1 == id) {
          //now 'value' is what you want
          System.out.println(value);
     }
 }


Note: can break the loop when the result is satisfied.

how to get specific value from json file in java
I want to simulate a multi-agent system with Blender. It's almost done, but I experience a problem.

System agents speak to each other by passing messages, and I want to pass messages between them. I considered a text object as container of these messages. There is no constraint on the number of agents.

I want to create one (or some) text object and reuse it many times, by only changing source and destination locations and body texts.

After some search, I realized, that there is no data_path that supports keyframe_insert() to change the body text. Beside that I found dynamic text, but my context is extremely different with that method's context.

I want to change text on every keyframe, and it depends on my simulation's input.
