# unable to extract json from logs and parse it

**URL:** <https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511>\
**Category:** DQL\
**Tags:** dql, json, parse\
**Created:** [July 16, 2025, 3:45pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511 "2025-07-16T15:45:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramchandgadde](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Post date:** [July 16, 2025, 3:45pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/1 "2025-07-16T15:45:18Z")

</div>

Below is my DQL query and how to extract json and parse the json? Earlier I was using DQL parse command not fetching all data.  
&nbsp;  
data record(content=“[INFO][EAP\_WORKDAY][DYNATRACE] 2025-07-16 12:45:23.999 Merged\_Response [{‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16076\_9885bc5832094b06bfc2572009db68d9’, ‘Process\_Type’: None, ‘Status’: ‘ERROR’, ‘Start\_Date\_and\_Time’: None, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:00’, ‘Acc\_Center\_Batch\_ID’: ‘16076’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16027\_4c323fff6e354e76927f38dd8b9f97b9’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:18:14.937240Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:06’, ‘Acc\_Center\_Batch\_ID’: ‘16027’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_16027\_4c323fff6e354e76927f38dd8b9f97b9’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:19:30.785763Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:06’, ‘Acc\_Center\_Batch\_ID’: ‘16027’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16101\_7b97e61e32804f7f86c81cd926e7d989’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:20:28.723717Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:02’, ‘Acc\_Center\_Batch\_ID’: ‘16101’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_16101\_7b97e61e32804f7f86c81cd926e7d989’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:21:03.272498Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:01’, ‘Acc\_Center\_Batch\_ID’: ‘16101’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_15972\_328a4276cca3494b9040054cac506b83’, ‘Process\_Type’: None, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: None, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:00’, ‘Acc\_Center\_Batch\_ID’: ‘15972’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_15981\_d88dea264ae74fa6a4d0fb238d68d113’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:18:23.535363Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:03’, ‘Acc\_Center\_Batch\_ID’: ‘15981’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_15981\_d88dea264ae74fa6a4d0fb238d68d113’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:19:33.355444Z’, ‘WorkdayID’: None, ‘End\_Date\_and\_Time’: ‘00:00:04’, ‘Acc\_Center\_Batch\_ID’: ‘15981’}]”)  
| filter contains(content, “Merged\_Response”)  
| parse content, “LD 'Merged\_Response’JSON:json”

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [July 16, 2025, 5:01pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/2 "2025-07-16T17:01:54Z")

</div>

So you actually need to use the JSON\_ARRAY parser instead of JSON, but the real issue is with the values that are None. Those are not interpreted as strings and are therefore not valid json.

---

<div class="post-metadata">

**Author:** ![ramchandgadde](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Post date:** [July 16, 2025, 5:14pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/3 "2025-07-16T17:14:24Z")

</div>

I tried to replace None value with ‘’ and updated query with Json Array. but no luck

data record(content=“[INFO][EAP\_WORKDAY][DYNATRACE] 2025-07-16 12:45:23.999 Merged\_Response [{‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16076\_9885bc5832094b06bfc2572009db68d9’, ‘Process\_Type’: ‘’, ‘Status’: ‘ERROR’, ‘Start\_Date\_and\_Time’: ‘’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:00’, ‘Acc\_Center\_Batch\_ID’: ‘16076’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16027\_4c323fff6e354e76927f38dd8b9f97b9’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:18:14.937240Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:06’, ‘Acc\_Center\_Batch\_ID’: ‘16027’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_16027\_4c323fff6e354e76927f38dd8b9f97b9’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:19:30.785763Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:06’, ‘Acc\_Center\_Batch\_ID’: ‘16027’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16101\_7b97e61e32804f7f86c81cd926e7d989’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:20:28.723717Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:02’, ‘Acc\_Center\_Batch\_ID’: ‘16101’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_16101\_7b97e61e32804f7f86c81cd926e7d989’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:21:03.272498Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:01’, ‘Acc\_Center\_Batch\_ID’: ‘16101’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_15972\_328a4276cca3494b9040054cac506b83’, ‘Process\_Type’: ‘’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:00’, ‘Acc\_Center\_Batch\_ID’: ‘15972’}, {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_15981\_d88dea264ae74fa6a4d0fb238d68d113’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:18:23.535363Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:03’, ‘Acc\_Center\_Batch\_ID’: ‘15981’}, {‘Integration\_Platform’: ‘DB\_NOTIFIER’, ‘Integration\_Process’: ‘ATLAS\_15981\_d88dea264ae74fa6a4d0fb238d68d113’, ‘Process\_Type’: ‘DB’, ‘Status’: ‘COMPLETED’, ‘Start\_Date\_and\_Time’: ‘2025-07-16T07:19:33.355444Z’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:04’, ‘Acc\_Center\_Batch\_ID’: ‘15981’}]”)  
| filter contains(content, “Merged\_Response”)  
| parse content, “LD 'Merged\_Response’JSON\_ARRAY:json”  
|fields json

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [July 16, 2025, 5:21pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/4 "2025-07-16T17:21:46Z")

</div>

Sorry forgot to mention there’s a space after Merged\_Response so your parsing string should look like this:&nbsp; “LD ‘Merged\_Response’ SPACE JSON\_ARRAY:json”

---

<div class="post-metadata">

**Author:** ![ramchandgadde](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Post date:** [July 16, 2025, 5:33pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/5 "2025-07-16T17:33:51Z")

</div>

Hi, I tried with space - still facing same issue.

---

<div class="post-metadata">

**Author:** ![ramchandgadde](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Post date:** [July 16, 2025, 5:50pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/6 "2025-07-16T17:50:52Z")

</div>

to simplify , I removed array and keeping content small. the problem unable extract json it is always coming null

data record(content=“[INFO][EAP\_WORKDAY][DYNATRACE] 2025-07-16 17:30:24.173 Merged\_Entry {‘Integration\_Platform’: ‘DB\_BATCH’, ‘Integration\_Process’: ‘ATLAS\_16076\_9885bc5832094b06bfc2572009db68d9’, ‘Process\_Type’: ‘’, ‘Status’: ‘ERROR’, ‘Start\_Date\_and\_Time’: ‘’, ‘WorkdayID’: ‘’, ‘End\_Date\_and\_Time’: ‘00:00:00’, ‘Acc\_Center\_Batch\_ID’: ‘16076’}”)  
| filter contains(content, “Merged\_Entry”)  
| parse content, “LD ‘Merged\_Entry’ Json:json”  
|fields json

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [July 16, 2025, 7:30pm UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/7 "2025-07-16T19:30:39Z")

</div>

So it needs to be proper json in order to parse. You’ll need to replace all the single quotes with double quotes. Your parse command was still missing the space. It will work with this after you change to proper json and double quotes:&nbsp;&nbsp;LD ‘Merged\_Entry’ SPACE JSON:json

---

<div class="post-metadata">

**Author:** ![GerardJ](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gerardj/32/154_2.png) [@GerardJ](https://community.dynatrace.com/u/GerardJ)\
**Post date:** [July 17, 2025, 11:49am UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511/8 "2025-07-17T11:49:09Z")

</div>

Hello  
As said in this other [post](https://community.dynatrace.com/post/281670#M2322) from&nbsp;[@ramchandgadde](https://community.dynatrace.com/user/93291)&nbsp;, you can use the JSON\_ARRAY in non-strict mode to parse such&nbsp;array not following JSON specification

```markup
| parse content, """LD "Merged_Response " JSON_ARRAY(strict=false):array"""

```
