Hello,

I have the following json

{
  "status": {
    "group": "group1",
    "partitions": [
      {
        "topic": "topic1",
        "partition": 0,
        "start": {
          "offset": 0,
          "timestamp": 1543337772415,
          "lag": 0,
          "max_offset": 0
        },
        "end": {
          "offset": 0,
          "timestamp": 1543337812000,
          "lag": 0,
          "max_offset": 0
        }
      }
    ]
  }
}

I'm looking for a way in groovy to find the value of
status.partitions.end.lag when I know the values of status.group,
status.partitions.topic and status.partitions.partition?  I may need to
rethink my approach to how I think I should parse this json, but hopefully
there is an easy way to do this.

Also, there can be multiple levels of the values that I know.  Just showing
one for simplicity.

Thanks.

Reply via email to