Skip to content

Add option for VRL function parse_key_value to specify resulting key case #1313

@alexeynl

Description

@alexeynl

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Lets we have the following strings:

key1=value1,key2=value2
Key1=value1,Key2=value2

In current implementation using

result = parse_key_value(string)

i need check both

result.key1
result.Key1

for value.

Attempted Solutions

No response

Proposal

If i have keys in key value string contains in different cases i need option to specify case of resulting field names like this:

result = parse_key_value(string, key_case: "low")

result.key1 must return value1 for both string:

key1=value1,key2=value2
Key1=value1,Key2=value2

References

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureA value-adding code addition that introduce new functionality.vrl: stdlibChanges to the standard library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions