pip install jsonpath基本知识
- 官方:https://goessner.net/articles/JsonPath/https://juejin.cn/post/6850418109473783816https://blog.csdn.net/myt2000/article/details/120757692
JsonPaht 表达式:
"$..*[?(@=='12M7qEpkl85g00')]"
示例
jsonpath(json_obj, "$..*[?(@=='12M7qEpkl85g00')]",result_type="IPATH")
返回值:
[['items', '0', 'userId']]
路径转换为表达式, 使用引号,可解决中间有空格问题
$.'items'.'0'.'userId' or $['items']['0']['userId']



