我有一个简单的JSON,我想获得两个属性:如何从json中使用jsonpath获取多个元素?
core
和matching
并验证是否core : true
和matching : true
。
{
"lockVersion"
: 1,
"updatedBy" : "jan",
"updatedOn" : "2016-09-25T11:21:45Z",
"id" : 964,
"title" : "Corporate Numeric",
"description" : null,
"descType" : 31084140,
"descValueType" : 31084136,
"defaultSourceOfVerification" : "Source",
"core" : true,
"matching" : true,
"anything" :
[
],
"authorized"
:
[
1
]
}
是否有可能使用AND运算符执行此操作,还是必须执行两步操作来提取一个集合,然后再次筛选以获得最终结果? 我打算使用jp @ gc - JSON Path Assertion。
我upvoted你的答案,谢谢 –
这个解决方案适合我,谢谢;-) – Kac