Skip to main content
Question

Parsing for nested Json

  • December 18, 2025
  • 1 reply
  • 50 views

ashu

Hi all 

i am having issue parsing nested Json 

the event goes like 
{
  "records": [
    {
      "time": "2025-12-18T17:25:46.3598689Z",
      "operationName": "Publish"

}

{

"time": "2025-12-18T17:25:46.3598689Z",
      "operationName": "Publish"

}
  ],
  "_time": 1766078828.252,
  "index": "index",
  "sourcetype": "sourcetype",
  "source": "source"
}

so basically, records field have multiple Json event Nested in it  i want to extract to individual events with parent fields like metadata carried to each 
right now when i use event breaker i am getting no change can someone help me 

 

1 reply

  • New Participant
  • May 22, 2026

Hello

With advent of OTEL data it is becoming too complex today with this nested data concept. For example LogicMonitor data Publisher export data in certain format and this is heavily nested. Example is found in this link https://www.logicmonitor.com/support/logicmonitor-data-publisher-for-kafka-receiver

I had been trying for days and nothing seems to flatten it. On top if it needs to go to Splunk HEC that adds more complexity as splunk needs 1 Metrics per event. This has become too complex and am about to give up. No AI chatgpt java script is able to handle this 

Example 

{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "hostName",
"value": {
"stringValue": "127.0.0.1"
}
},
{
"key": "hostId",
"value": {
"stringValue": "13359"
}
}
]
},
"scopeMetrics": [
{
"scope": {
"name": "LogicMonitor_Collector_JVMGarbageCollection",
"attributes": [
{
"key": "collector",
"value": {
"stringValue": "jmx"
}
},
{
"key": "epoch",
"value": {
"stringValue": "1779370342098"
}
},
{
"key": "datasourceId",
"value": {
"stringValue": "897"
}
},
{
"key": "datasourceInstanceId",
"value": {
"stringValue": "537954400"
}
}
]
},
"metrics": [
{
"name": "CollectionTime",
"sum": {
"dataPoints": [
{
"startTimeUnixNano": "1779370342098000000",
"timeUnixNano": "1779370342098000000",
"asDouble": 140,
"attributes": [
{
"key": "dataSourceInstanceName",
"value": {
"stringValue": "LogicMonitor_Collector_JVMGarbageCollection-G1 Concurrent GC"
}
},
{
"key": "datapointid",
"value": {
"stringValue": "5429"
}
},
{
"key": "wildValue",
"value": {
"stringValue": "G1 Concurrent GC"
}
},
{
"key": "wildAlias",
"value": {
"stringValue": "G1 Concurrent GC"
}
}
]
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_DELTA",
"isMonotonic": true
}
},
{
"name": "Count",
"sum": {
"dataPoints": [
{
"startTimeUnixNano": "1779370342098000000",
"timeUnixNano": "1779370342098000000",
"asDouble": 16,
"attributes": [
{
"key": "dataSourceInstanceName",
"value": {
"stringValue": "LogicMonitor_Collector_JVMGarbageCollection-G1 Concurrent GC"
}
},
{
"key": "datapointid",
"value": {
"stringValue": "5430"
}
},
{
"key": "wildValue",
"value": {
"stringValue": "G1 Concurrent GC"
}
},
{
"key": "wildAlias",
"value": {
"stringValue": "G1 Concurrent GC"
}
}
]
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_DELTA",
"isMonotonic": true
}
}
]
}
]
}
],
"_time": 1779388930.109
}