JSONPath 从数组中获取参数
JSONPath to get parameter from an array
我有一个响应主体,我认为它是一个数组,如下所示:
{"id":982,"form_stage":"1","customer_hash":"fffae165253f494a95bdb753ca87716c"}
在这种情况下,我想获得 "customer_hash" 并且我已经尝试了 $..customer_hash $.customer_hash 等的所有组合,但其中 none 有效因为这不是以 "response" 或 "result" 开头我猜它是一个数组而不是对象(?)。
谁能告诉我获取参数 "customer_hash" 的 JSONPath 映射是什么?
尝试使用:
$.customer_hash
输出:
[
"fffae165253f494a95bdb753ca87716c"
]
我有一个响应主体,我认为它是一个数组,如下所示:
{"id":982,"form_stage":"1","customer_hash":"fffae165253f494a95bdb753ca87716c"}
在这种情况下,我想获得 "customer_hash" 并且我已经尝试了 $..customer_hash $.customer_hash 等的所有组合,但其中 none 有效因为这不是以 "response" 或 "result" 开头我猜它是一个数组而不是对象(?)。
谁能告诉我获取参数 "customer_hash" 的 JSONPath 映射是什么?
尝试使用:
$.customer_hash
输出:
[
"fffae165253f494a95bdb753ca87716c"
]