Bootstrap

Jmeter 取响应值中list或数组的长度

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

String jsonContent = prev.getResponseDataAsString();
 
JSONObject response = JSON.parseObject(jsonContent);
JSONArray dataList = response.getJSONObject("data").getJSONArray("data");
int length = dataList.size();

;