Skip to content

Allow for accessing nested object data. #619

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

Merged
merged 6 commits into from
Jun 20, 2019
Merged

Allow for accessing nested object data. #619

merged 6 commits into from
Jun 20, 2019

Conversation

GrandVizierOlaf
Copy link
Contributor

@GrandVizierOlaf GrandVizierOlaf commented May 13, 2019

This PR allows for the use of dot notation in the column names to access nested object data.

For instance, the modified example adds a phone object to each existing user and each phone has a "home" and "cell" attribute. These nested attributes can be accessed with a column name of "phone.home" and "phone.cell", respectively.

Any amount of nested will work with this.

This addresses #147, #531, and (I think) #475.

@coveralls
Copy link

coveralls commented May 13, 2019

Coverage Status

Coverage decreased (-0.1%) to 76.997% when pulling 58f2799 on GrandVizierOlaf:master into dc45413 on gregnb:master.

@skyleronken
Copy link

Can we merge this? the conflict is in the package-lock.json file and those changes are only on optional flags.

@gabrielliwerant
Copy link
Collaborator

We can't merge this until the conflicts are resolved, but it also needs review, which I will provide when I have the time.

@gabrielliwerant gabrielliwerant self-assigned this Jun 11, 2019
@gabrielliwerant gabrielliwerant added needs review Useful to mark PRs for what's up next to review enhancement labels Jun 11, 2019
@gabrielliwerant gabrielliwerant removed their assignment Jun 12, 2019
@gabrielliwerant gabrielliwerant self-requested a review June 12, 2019 06:34
Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice, and looks like a highly requested feature.

I think we just need to clean up the edge case where we have improper/missing paths.

@gabrielliwerant gabrielliwerant added needs work and removed needs review Useful to mark PRs for what's up next to review labels Jun 12, 2019
@gabrielliwerant
Copy link
Collaborator

Also would be great to have a test for this, if you've got the time.

Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the undefined check! I will attempt a test before next release, but this looks good for merge.

@empav
Copy link

empav commented Aug 1, 2019

Hey guys, is this feature working? I've the following issue:

const applicant = { name: 'test', surname: 'test' };

Screenshot 2019-08-01 at 12 59 21

@gabrielliwerant
Copy link
Collaborator

@epavan I need more information to debug your code (in particular, the actual code). Make sure you are using this feature as indicated in the example data-as-object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants