import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
//拿到需要转化的json字符串
String jsonString="[{"input4":"40","input3":"30","input2":"20","input1":"10"}]";
JSONArray jsonArray=JSONArray.parseArrayjsonString);
forint i=0;i<jsonArray.size);i++){
JSONObject object= JSONObject) jsonArray.geti);
System.out.printlnobject.get"input3"));
}
结果打印:30