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

filterx: flatten() #221

Merged
merged 4 commits into from
Jul 30, 2024
Merged

filterx: flatten() #221

merged 4 commits into from
Jul 30, 2024

Conversation

alltilla
Copy link
Member

@alltilla alltilla commented Jul 22, 2024

Example:

dict = json({"top_level_field":42,"top_level_dict":{"inner_field":1337,"inner_dict":{"inner_inner_field":1}}});

flat_with_default_separator = dict;
flatten(flat_with_default_separator);
# {"top_level_field":42,"top_level_dict.inner_dict.inner_inner_field":1,"top_level_dict.inner_field":1337},

flat_with_custom_separator = dict;
flatten(flat_with_custom_separator, separator="->");
# {"top_level_field":42,"top_level_dict->inner_dict->inner_inner_field":1,"top_level_dict->inner_field":1337}

@alltilla alltilla force-pushed the filterx-flatten-dict branch from 97fb599 to 8d0ca8a Compare July 22, 2024 14:19
alltilla added 4 commits July 29, 2024 10:10
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
@alltilla alltilla force-pushed the filterx-flatten-dict branch from 8d0ca8a to f2f51b5 Compare July 29, 2024 08:20
@alltilla alltilla changed the title filterx: flatten_dict() filterx: flatten() Jul 29, 2024
@OverOrion OverOrion self-requested a review July 29, 2024 11:00
@OverOrion OverOrion merged commit e836f7a into axoflow:main Jul 30, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants