# Log processing rules : how to set newfeild=success by checking if a key exist in Parsed JSON

**URL:** <https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166>\
**Category:** DQL\
**Tags:** dql, log-processing, log-monitoring-class, dpl\
**Created:** [October 18, 2023, 5:07pm UTC](https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166 "2023-10-18T17:07:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pallepavan](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pallepavan](https://community.dynatrace.com/u/pallepavan)\
**Post date:** [October 18, 2023, 5:07pm UTC](https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166/1 "2023-10-18T17:07:43Z")

</div>

is it possible to add a field to logs by check if a KEY exist in a Parsed JSON while processing logs,

JSON SAMPLE :  
{

“name” : “test”

“action” : “some random string”

…

…

}

requirement : add a new\_feild as log attribute if json contains a key named “action”

PARSE(content,“JSON:data”) |  
FIELDS\_ADD( new\_feild: IF{ ??? })

---

_[View the full topic](https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166)._
