我使用属性来保存我的json有效负载
<property expression="json-eval($.)" name="req_json" scope="default" type="STRING"/>
json内容如下:
{ "schema": { "computerName": "PC243854", "ipAddress": "11.2.45.120"}, "data": { "code": "ZFIR006", "filters":[{ "dataType": "integer", "fieldName": "TEST", "operator": "=", "values": ["1","9"] } ], "schema":1} }
我想使用“req_json”属性来获取过滤器的json内容值,我该怎么办?
[{ "dataType": "integer", "fieldName": "TEST", "operator": "=", "values": ["1","9"] } ]
答案 0 :(得分:1)
您是否必须从req_json属性获取它?你可以从有效载荷中更容易地将它存储在另一个属性中
<property expression="json-eval($.data.filters)" name="req_filters" scope="default"/>
您可以在此处获取更多json操作示例:https://docs.wso2.com/display/EI611/JSON+Support