# Log processing rule for masking an email within a json object

**URL:** <https://community.dynatrace.com/t/log-processing-rule-for-masking-an-email-within-a-json-object/51379>\
**Category:** Logs\
**Tags:** log-processing, logs\
**Created:** [April 25, 2025, 3:38pm UTC](https://community.dynatrace.com/t/log-processing-rule-for-masking-an-email-within-a-json-object/51379 "2025-04-25T15:38:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zahra-khan](https://avatars.discourse-cdn.com/v4/letter/z/eb8c5e/32.png) [@zahra-khan](https://community.dynatrace.com/u/zahra-khan)\
**Post date:** [April 25, 2025, 3:38pm UTC](https://community.dynatrace.com/t/log-processing-rule-for-masking-an-email-within-a-json-object/51379/1 "2025-04-25T15:38:57Z")

</div>

![zahrakhan_0-1745595463017.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/ea12a858b79860a2c8f99386c770a6dbebe6cf21.png)

Here is my log processing rule. Can anyone tell me what I am doing wrong?  
I am really struggling to get this to work. I have stripped down my actual JSON object a lot, but I can’t get it to work.

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [April 25, 2025, 8:03pm UTC](https://community.dynatrace.com/t/log-processing-rule-for-masking-an-email-within-a-json-object/51379/2 "2025-04-25T20:03:52Z")

</div>

Two things per the [documentation](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/methods-of-masking-sensitive-data#mask-logs-ingest):  
1.&nbsp;Whenever the content or any other attribute is to be changed, it has to be declared as&nbsp;INOUT&nbsp;(writable) with the&nbsp;USING&nbsp;command.

2. When replacing, the input and output fields need to be the same. For instance, if you’re modifying ‘content’, then your FIELDS\_ADD command should add a&nbsp; field called ‘content’ instead of ‘modified\_content’. This way the newly formed field replaces what was there before.
