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

Field selection with recursive path operator "..." #34

Open
nichtich opened this issue Sep 19, 2013 · 5 comments
Open

Field selection with recursive path operator "..." #34

nichtich opened this issue Sep 19, 2013 · 5 comments
Labels

Comments

@nichtich
Copy link
Member

How about a path operator ... that selects of fields and subfields?:

# { foo => "  x ", bar => { foo = "  y "} }
trim("...foo") # { foo => "x", bar => { foo = "y"} }
@nics nics added feature and removed feature labels Mar 3, 2014
@vpeil
Copy link
Member

vpeil commented Apr 1, 2015

What about Data::Seek as a general solution for traversing complex hashes

@phochste
Copy link
Member

This feature (and much more) will be available in the next release of Catmandu with the visitor() bind:

do visitor()
    if all_match(key,foo)
        trim(scalar)
    end
end

https://github.com/LibreCat/Catmandu/blob/dev/lib/Catmandu/Fix/Bind/visitor.pm

@vpeil
Copy link
Member

vpeil commented Jul 13, 2015

this one can be closed, I suppose? The magic visitor bind has been released.

@phochste
Copy link
Member

Visitor is one route. @nics is working on a new Fix path algorithm that can do the requests shorthand in a future release of Catmandu

@nichtich
Copy link
Member Author

See #56 first.

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

No branches or pull requests

4 participants