Field name start with

How can i check if a field name (not value) start with some caracter ?

{
  params{
    firstname : value1,
    $lastname : value2
  }
}

How can i verify if lastname field start with $ ?
And if yes remove it.

B.R

You mean you want Logstash to go over all field names and strip any leading dollar signs it finds? I suspect you need to write a small Ruby snippet and put in a ruby filter.