{"id":16099733,"url":"https://github.com/mrtimeey/object-finder","last_synced_at":"2026-01-20T07:02:24.093Z","repository":{"id":206581131,"uuid":"717224213","full_name":"MrTimeey/object-finder","owner":"MrTimeey","description":"Library for finding objects in complex data structures","archived":false,"fork":false,"pushed_at":"2024-08-01T19:31:50.000Z","size":48,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T16:52:01.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrTimeey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-10T21:10:29.000Z","updated_at":"2023-11-14T12:38:32.000Z","dependencies_parsed_at":"2024-10-27T17:40:49.950Z","dependency_job_id":null,"html_url":"https://github.com/MrTimeey/object-finder","commit_stats":null,"previous_names":["mrtimeey/object-finder"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MrTimeey/object-finder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTimeey%2Fobject-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTimeey%2Fobject-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTimeey%2Fobject-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTimeey%2Fobject-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrTimeey","download_url":"https://codeload.github.com/MrTimeey/object-finder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTimeey%2Fobject-finder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T18:44:04.471Z","updated_at":"2026-01-20T07:02:24.078Z","avatar_url":"https://github.com/MrTimeey.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# object-finder [![CI](https://github.com/MrTimeey/object-finder/actions/workflows/mvn-build.yml/badge.svg?branch=main)](https://github.com/MrTimeey/object-finder/actions/workflows/mvn-build.yml?query=branch%3Amain) [![Maven Central](https://img.shields.io/maven-central/v/io.github.mrtimeey/object-finder.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.mrtimeey%22%20AND%20a:%22object-finder%22) [![Javadocs](http://www.javadoc.io/badge/io.github.mrtimeey/object-finder.svg)](http://www.javadoc.io/doc/io.github.mrtimeey/object-finder)\nThe object-finder provides utility functions to identify specific objects in complex data structures.\n* [Object-Finder's goals](#goals)\n* [TL;DR](#tldr)\n* [Longer example](./exampleUseCase.md)\n* [Quickstart](#quickstart)\n\n## \u003ca name=\"goals\"/\u003eObject-Finder's goal\u003c/a\u003e\n\nObject-Finder's ambition is to provide simple utility methods to find specific objects in complex data structures.\nThe idea is that you don't want to navigate through the object over and over again. \nFinding various objects in a complex object often leads to multiple same looking methods and duplicated code.\n\nThe Object-Finder wants to simply your code. \n\n## \u003ca name=\"tldr\"/\u003eTL;DR\u003c/a\u003e\n\n*Important:* \n\nThe returned object is a new instance and no reference from provided root object.\nChanging the returned object will not affect the base object. \nThere will be an additional API-endpoint soon.\n\n### Get object by field\n```java\n      Pair\u003cString, Object\u003e location = Pair.of(\"id\", \"02f26e1b-e548-440d-8bfc-559d7c9fb1bd\");\n      Optional\u003cCalculationPart\u003e result = FindObjectUtils.find(baseObject, location, CalculationPart.class);\n      assertThat(result).isPresent();\n```\n\n### Get object by nested object value\n```java \n      Pair\u003cString, Object\u003e location = Pair.of(\"information/key\", \"SPECIAL_DISCOUNT\");\n      Optional\u003cCalculationPart\u003e result = FindObjectUtils.find(baseObject, location, CalculationPart.class);\n      assertThat(result).isPresent();\n```\n\n### Get object by string in list\n ```java \n      Pair\u003cString, Object\u003e location = Pair.of(\"names[]\", \"specialDiscount\");\n      Optional\u003cCalculationPart\u003e result = FindObjectUtils.find(baseObject, location, CalculationPart.class);\n      assertThat(result).isPresent();\n ```\n\n### Get object by nested object value in list\n ```java \n      Pair\u003cString, Object\u003e location = Pair.of(\"properties[id]\", \"d9c40d29-e828-4c15-9519-29891496ec8e\");\n      Optional\u003cCalculationPart\u003e result = FindObjectUtils.find(baseObject, location, CalculationPart.class);\n      assertThat(result).isPresent();\n ```\n\n### Get all objects by nested object value\n\n```java\n      Pair\u003cString, Object\u003e location = Pair.of(\"information/key\", \"SPECIAL_DISCOUNT\");\n      List\u003cCalculationPart\u003e result = FindObjectUtils.findAll(baseObject, location, CalculationPart.class);\n      assertThat(result).hasSize(2);\n```\n\n## \u003ca name=\"quickstart\"/\u003eQuickstart\u003c/a\u003e\n\nAdd Maven Dependency:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.mrtimeey\u003c/groupId\u003e\n  \u003cartifactId\u003eobject-finder\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtimeey%2Fobject-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtimeey%2Fobject-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtimeey%2Fobject-finder/lists"}