# map-value-pairs: Rename value-pairs to normalize logs

The `map-value-pairs()` parser allows you to map existing name-value pairs to a different set of name-value pairs. You can rename them in bulk, making it easy to use for log normalization tasks (for example, when you parse information from different log messages, and want to convert them into a uniform naming scheme). You can use the [normal value-pairs expressions](../../../docs/axosyslog-core/chapter-concepts/concepts-value-pairs/index.md), similarly to value-pairs based destinations. Using `map-value-pairs()` retains type data if available.

Available in AxoSyslog version 3.10 and later.

## Declaration
```
    parser parser_name {
        map-value-pairs(
            <list-of-value-pairs-options>
        );
    };
    
```

## Example: Map name-value pairs

The following example creates a new name-value pair called `username`, adds the hashed value of the `.apache.username` to this new name-value pair, then adds the `webserver` prefix to the name of every name-value pair of the message that starts with `.apache`
```
 
    parser p_remap_name_values {
        map-value-pairs(
            pair("username", "'($sha1 $.apache.username)")
            key('.apache.*' rekey(add-prefix("webserver")))
        );
    };
    
```

Last modified April 9, 2025: [Rewrite-related formatting fixes and title shortenings (07c928a3)](<https://github.com/axoflow/axosyslog-core-docs/commit/07c928a36247e7d98c8d00726187c3afdbc96875>)