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

feat: add sub-path support to mutator and retriever #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mishavantol
Copy link
Member

Add support for sub-paths (e.g. 'file.metaData.path'). Should not conflict with indexed paths e.g. 'person.addresses.0' or 'person.addresses.private'. The former has a numerical index and is thereby ignored, the latter is not as straightforward. When retrieving data we check if the index ('path') exists on the property ('metaData'). Indexed properties should always be non-associative array and thus there is no match. When setting data we can check the value. If the value is an associative array we must assume it's an indexed path and process it as such. Hence it is not possible to use an associative array as a value for a sub-path (but I don't think that's a common use case).

Fixes #2

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.

does not support sub paths
1 participant