'How to comment in body in the Kibana console editor

I do know that if we wanted to comment separately before any GET/POST request we can make it.

But how about if within the body of JSON I wanted to comment.

example: My aim is to fire query 1. but i wanted to preserve another field for future use for testing only(quert 2), so how can i do that.

Query 1

# this is just a simple comment
GET ingestion/order/_search
{
  "size":0,
      "aggs": {
        "status_aggs": {
          "terms": {
            "field": "compType.keyword"
          }
        }
      }
}

Query 2

GET ingestion/order/_search
    {
      "size":0,
          "aggs": {
            "status_aggs": {
              "terms": {
                "field": "compType.keyword"
               #"field": "statType.keyword"  
              }
            }
          }
    }

Just wanted to comment out statType line only. Appreciated your help if someone knows how to do that.



Solution 1:[1]

I don't think it can be done because json inherently doesn't support comments. As the query body here is json, comments aren't supported.

Solution 2:[2]

Add /* */, for example, /* "field": "statType.keyword" */

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Abhilash Bolla
Solution 2 buxizhizhoum