我想在哪里提取 id
holder.parameter="jira-software-users" 和 "permission"="ADMINISTER_PROJECTS"
我正在使用 $.permissions[?(@.holder.parameter=="jira-software-users")]).id 或 $.permissions[?(@.permission=="ADMINISTER_PROJECTS")].id 或通过组合他们
它无法正常工作。怎么能达到同样的效果?我在https://jsonpath.com/测试这个
{
"permissions": [
{
"id": 10025,
"self": "http://localhost:2990/jira/rest/api/2/permissionscheme/0/permission/10025",
"holder": {
"type": "projectRole",
"parameter": "10002",
"expand": "projectRole"
},
"permission": "MANAGE_WATCHERS"
},
{
"id": 10004,
"self": "http://localhost:2990/jira/rest/api/2/permissionscheme/0/permission/10004",
"holder": {
"type": "projectRole",
"parameter": "10002",
"expand": "projectRole"
},
"permission": "ADMINISTER_PROJECTS"
},
{
"id": 10401,
"self": "http://localhost:2990/jira/rest/api/2/permissionscheme/0/permission/10401",
"holder": {
"type": "projectRole",
"parameter": "jira-software-users",
"expand": "projectRole"
},
"permission": "MANAGE_SPRINTS_PERMISSION"
},
{
"id": 10740,
"self": "http://localhost:2990/jira/rest/api/2/permissionscheme/0/permission/10740",
"holder": {
"type": "group",
"parameter": "jira-software-users",
"expand": "group"
},
"permission": "ADMINISTER_PROJECTS"
}
],
"expand": "user,group,projectRole,field,all"
}