@jkuang I am getting the output as below. Its getting additional details as well. I just need the required format mentioned above . am I missing anything here? I used
_nodes/jvm?pretty | grep -i 'node\|heap'
{
  "cluster_name": "ittesprod",
  "nodes": {
    "G-vSfTFnSDWJD4yGIDJo4g": {
      "name": "ITTESPROD-MSTR2",
      "transport_address": "10.158.36.202:9300",
      "host": "10.158.36.202",
      "ip": "10.158.36.202",
      "version": "2.4.0",
      "build": "ce9f0c7",
      "http_address": "10.158.36.202:9200",
      "attributes": {
        "data": "false",
        "master": "true"
      },
      "jvm": {
        "pid": 10768,
        "version": "1.8.0_102",
        "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
        "vm_version": "25.102-b14",
        "vm_vendor": "Oracle Corporation",
        "start_time_in_millis": 1487309091680,
        "mem": {
          "heap_init_in_bytes": 3758096384,
          "heap_max_in_bytes": 3632857088,
          "non_heap_init_in_bytes": 2555904,
          "non_heap_max_in_bytes": 0,
          "direct_max_in_bytes": 3632857088
        },
        "gc_collectors": [
          "ParNew",
          "MarkSweepCompact"
        ],
        "memory_pools": [
          "Code Cache",
          "Metaspace",
          "Compressed Class Space",
          "Par Eden Space",
          "Par Survivor Space",
          "Tenured Gen"
        ],
        "using_compressed_ordinary_object_pointers": "true"
      }
    },
    "3XJ7xxTIRR2VxJ9NAwb-ng": {
      "name": "ITTESPROD-DATA3",
      "transport_address": "10.158.36.204:9300",
      "host": "10.158.36.204",
      "ip": "10.158.36.204",
      "version": "2.4.0",
      "build": "ce9f0c7",
      "attributes": {
        "master": "false"
      },
      "jvm": {
        "pid": 5428,
        "version": "1.8.0_102",
        "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
        "vm_version": "25.102-b14",
        "vm_vendor": "Oracle Corporation",
        "start_time_in_millis": 1487346872518,
        "mem": {
          "heap_init_in_bytes": 30064771072,
          "heap_max_in_bytes": 29062660096,
          "non_heap_init_in_bytes": 2555904,
          "non_heap_max_in_bytes": 0,
          "direct_max_in_bytes": 29062660096
        },
        "gc_collectors": [
          "ParNew",
          "MarkSweepCompact"
        ],
        "memory_pools": [
          "Code Cache",
          "Metaspace",
          "Compressed Class Space",
          "Par Eden Space",
          "Par Survivor Space",
          "Tenured Gen"
        ],
        "using_compressed_ordinary_object_pointers": "true"
      }