# JSON parsing: fieldsAdd or

**URL:** <https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333>\
**Category:** DQL\
**Tags:** log-analytics, dql, notebooks\
**Created:** [April 29, 2024, 5:27am UTC](https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333 "2024-04-29T05:27:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![krzysztof\_hoja](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/krzysztof_hoja/32/34625_2.png) [@krzysztof\_hoja](https://community.dynatrace.com/u/krzysztof_hoja)\
**Post date:** [May 10, 2024, 12:06pm UTC](https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333/4 "2024-05-10T12:06:00Z")

</div>

Simpler way to express:

```markup
error_message = if (isNull(parsedJSON[message]), parsedJSON[error][message], else:parsedJSON[message])

```

is using _ **coalesce** _ function

```markup
error_message =coalesce(parsedJSON[message], parsedJSON[error][message])

```

Kris

---

_[View the full topic](https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333)._
