Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple entries of source + list_to_map_when condition in list-to-map processor #5368

Open
niketan16 opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@niketan16
Copy link

Is your feature request related to a problem? Please describe.
Allow the list-to-map processor to convert multiple sources (a list of objects from an event) to maps of keys to objects under different conditions.

Describe the solution you'd like
Modify list-to-map processor to support this new configuration that allows multiple entries of source and list_to_map_when conditions like shown below. The existing configuration is still supported. This is new config under entries needs to be added.

processor:
    - list_to_map:
        entries:
           - source: "mylist"
             key: "name"
             value_key: "value"
             flatten: true
             list_to_map_when: "some-key == 'test'"
           - source: "mylist2"
             key: "name2"
             value_key: "value2"
             flatten: true
             list_to_map_when: "some-key2 == 'test2'"

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants