Need help in jq parser with my aggregrations

Hi Guys,

I am trying to figure out the Json data parsing out using jq from elastic 7.8. However I am confused and data is not being parsed correctly.

Can someone pls help me with?

  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 118,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "2": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 0,
      "buckets": [
        {
          "key": "15.16.17.18",
          "doc_count": 3
        },
        {
          "key": "192.168.5.114",
          "doc_count": 3
        },
        {
          "key": "12.13.14.1",
          "doc_count": 1
        },
        {
          "key": "12.13.14.10",
          "doc_count": 1
        }, | jq '.aggregations'
        

Am I missing anything? I just need to filter out key parameter

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.