Skip to main content
Solved

Syntax Issue: toLowerCase For Field With Special Character Like tenant.id

  • March 28, 2026
  • 6 replies
  • 1 view

This message originated from Cribl Community Slack.
Click here to view the original link.

Whats the syntax for doing a toLowerCase for a field like tenant.id or anything that contains a special character?

Best answer by mario

Hi @user, you can reference fields with special chars as __e[''] Or in your specific case: __e['tenant']['id'].toLowerCase() Hope that helps. :slightly_smiling_face:

Links for this message:
image.png

6 replies

I am guessing there are special circumstances when the data is metrics and not events

  • Employee
  • Answer
  • March 28, 2026
Hi @user, you can reference fields with special chars as __e[''] Or in your specific case: __e['tenant']['id'].toLowerCase() Hope that helps. :slightly_smiling_face:

Links for this message:
image.png

Does this work with metrics? I haven't had a chance to test this expression yet. But I noticed yesterday I couldn't get any expressions to work on metrics.

I should also note that in my sample data it's literally tenant.id It's not a JSON object

oh the first part worked. __e['tenant.id'].toLowerCase()

  • Employee
  • March 28, 2026
Glad to hear it worked, unfotunately I didn't find time to test it with metrics, although I would expect it works just as shown in your example above.