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

get all possible paths? #14

Open
yocontra opened this issue Aug 3, 2018 · 0 comments
Open

get all possible paths? #14

yocontra opened this issue Aug 3, 2018 · 0 comments

Comments

@yocontra
Copy link

yocontra commented Aug 3, 2018

Example input:

{
  a: {
    b: {
      c: 123,
      d: 'yo'
    }
  },
  z: 'text'
}

Expected output:

a.b.c
a.b.d
a.b
a
z

Is there any way to use dot-wild to say "show me all possible paths and their values"? Flatten seems the closest, but doesn't show objects or arrays. forEach there doesn't seem to be a way to make it recurse all the way down. Maybe the internal each method?

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

No branches or pull requests

1 participant