执行复杂的 jsonpath 查询

Perform complex jsonpath query

我有以下 json 回复。我想使用 json 路径进行过滤,如下所示: 获取人员 ec7e231e-1fed-4860-a1ab-c2e3248a183e 的第一个日期,其中 1. 日期不为空且 2. 考试数组为空且 3. 缺席标志为 false

[
  {
    "Person": {
      "ReferenceKey": "ec7e231e-1fed-4860-a1ab-c2e3248a183e",
      "fname": "john",
      "lname": "anderson",
      "adress": null
    },
    "days": [
      {
        "date": null,
        "absent": false,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      },
      {
        "date": "2021-02-19",
        "absent": false,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      },
      {
        "date": "2021-02-20",
        "absent": false,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      }
    ]
  },
  {
    "Person": {
      "ReferenceKey": "ec7e231e-1fed-4860-a1ab-c2e3248a1900",
      "fname": "manny",
      "lname": "panny",
      "adress": null
    },
    "days": [
      {
        "date": null,
        "absent": false,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      },
      {
        "date": "2021-02-19",
        "absent": false,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      },
      {
        "date": "2021-02-20",
        "absent": true,
        "holiday": false,
        "exam": [],
        "blockingtimes": []
      }
    ]
  }
]

到目前为止,我只能检索到所有人的 uuid $..person.mitarbeiterReferenceKey

类似

$.[?(@.Person.ReferenceKey == 'ec7e231e-1fed-4860-a1ab-c2e3248a183e')].days[?(@.date != null && @.absent == false && @.exam.length() == 0)])

更多信息: