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

Add queryGet.MAP #2

Merged
merged 1 commit into from
Jan 1, 2017
Merged

Add queryGet.MAP #2

merged 1 commit into from
Jan 1, 2017

Conversation

benurb
Copy link
Contributor

@benurb benurb commented Dec 30, 2016

Hi @sagold,

I thought about #1 a bit and came to the conclusion that neither dict() nor explode() work as a function name for me. json-pointer.dict() returns a dictionary of the input object independent of any pointers. And explode() implies the same for me. But the functionality this PR adds is merely a get() that returns an object instead of an array. So I implemented it this way. It was super simple and if you disagree about the change in the get() interface, it can be moved to a separate function easily. But then I would suggest a function name like map() or assoc().

Greetings,
Ben

It returns an object with pointers as keys and their respective value from the input data
@sagold
Copy link
Owner

sagold commented Jan 1, 2017

Hi @benurb.

I agree. Thanks for your efforts.

@sagold sagold closed this Jan 1, 2017
@sagold sagold reopened this Jan 1, 2017
@sagold sagold merged commit 2dcf5c9 into sagold:master Jan 1, 2017
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.

None yet

2 participants