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

a group_by option #14

Closed
ctomkow opened this issue Sep 20, 2022 · 1 comment
Closed

a group_by option #14

ctomkow opened this issue Sep 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ctomkow
Copy link
Owner

ctomkow commented Sep 20, 2022

Provide a group_by parameter for the methods to return the found values as part of a two dimensional list. Each found value part of the same dict will be returned as a list. Multiple lists will be returned within a list.

The new find_keys() function currently returns a 2d list. The default behaviour should be changed to return a simple list, and return a 2d list if the group_by parameter is True. The parameter should have a default of False.

@ctomkow ctomkow added the enhancement New feature or request label Sep 20, 2022
@ctomkow
Copy link
Owner Author

ctomkow commented Sep 27, 2022

You can pass the keyword parameter group=False to find_keys() to return a one dimensional list. https://github.com/ctomkow/jsonparse/commit/bead1efdcde1069f200c8b897c72304dde4b6de0

@ctomkow ctomkow closed this as completed Sep 27, 2022
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
None yet
Development

No branches or pull requests

1 participant