import("system.vars"); import("system.result"); var districtContactIds = vars.get("$param.DistrictContactIds_param"); if(districtContactIds) { result.string(JSON.parse(districtContactIds).length); } else { result.string(0); }