Skip to content

Add findFirst utility method #26

@x7airworker

Description

@x7airworker

Is your feature request related to a problem? Please describe.
When you want to find a value just by the key, but don't care about the structure, you most likely write a recursive method to do that for you. So I think it would be good to include this utility method into the project.

Describe the solution you'd like
Basically a recursive method for both AbstractObject and AbstractArray.
AbstractElement findFirst(String key)
The method should be on AbstractArray as well, because an AbstractArray could contain objects which contain the key I want to search for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions