JavaWebStack / JavaWebStack/abstract-data
Add findFirst utility method
- Dominant language
- Java
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating AbstractObject and AbstractArray and reading how they represent nested elements. Implement the requested findFirst(String key) behavior across both entry points, with recursive searching through nested objects and arrays; done means either type can find the requested key regardless of structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100