{"id":24334822,"url":"https://github.com/ayan-b/json_traverse","last_synced_at":"2026-03-16T20:32:14.340Z","repository":{"id":56833382,"uuid":"242344347","full_name":"ayan-b/json_traverse","owner":"ayan-b","description":":palm_tree: Traverse a deeply nested JSON with a query string","archived":false,"fork":false,"pushed_at":"2022-10-31T17:55:39.000Z","size":646,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T11:48:52.668Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/json_traverse","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayan-b.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-22T13:14:46.000Z","updated_at":"2022-10-31T17:55:24.000Z","dependencies_parsed_at":"2022-09-05T03:00:44.974Z","dependency_job_id":null,"html_url":"https://github.com/ayan-b/json_traverse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ayan-b/json_traverse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan-b%2Fjson_traverse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan-b%2Fjson_traverse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan-b%2Fjson_traverse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan-b%2Fjson_traverse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayan-b","download_url":"https://codeload.github.com/ayan-b/json_traverse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan-b%2Fjson_traverse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271963324,"owners_count":24850603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hacktoberfest"],"created_at":"2025-01-18T04:45:07.281Z","updated_at":"2026-03-16T20:32:14.296Z","avatar_url":"https://github.com/ayan-b.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"https://ayan-b.github.io/json_traverse/maple-tree.jpg\" width=\"200\" height=\"200\"\u003e\n\t\u003ch1\u003eJSON Traverser\u003c/h1\u003e\n\t\u003cp\u003e\n\t\t\u003cb\u003eTraverse a deeply nested JSON with a query string\u003c/b\u003e\u003cbr\u003e\n    \u003ci\u003ePhoto by Simone Dalmeri on Unsplash\u003c/i\u003e\n\t\u003c/p\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/div\u003e\n\n[![Pub Package](https://img.shields.io/pub/v/json_traverse.svg)](https://pub.dev/packages/json_traverse)\n[![Build Status](https://travis-ci.com/ayan-b/json_traverse.svg?branch=master)](https://travis-ci.com/ayan-b/json_traverse)\n\n```dart\nimport 'package:json_traverse/json_traverse.dart';\n\nvoid main() {\n  var jsonString = '''\n  {\n    \"name\": \"John Smith\",\n    \"email\": \"john@example.org\",\n    \"contact\": [\n      \"123\",\n      \"456\"\n    ]\n  }\n  ''';\n  var traverser = JSONTraverse(jsonString);\n  // for a single string\n  print(traverser.query('name')); // Prints `John Smith`\n  // for an array, point the index\n  print(traverser.query('contact.1')); // Prints `456`\n}\n\n```\n\n## Usage\n\nFirst instantiate a `JSONTraverse` object: `JSONTraverse traverser = JSONTraverse(jsonString)`.\n\nNow, use the `query` method to traverse through the JSON: `traverser.query('name')`.\n\nIf you want to traverse through an array, you have to mention the index, _e.g._,\n`traverser.query('contact.1')` for index `1` of the contact array. If the index\nis not a valid number, the code will throw a `FormatException`.\n\n## License\n\n[BSD-3-Clause](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayan-b%2Fjson_traverse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayan-b%2Fjson_traverse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayan-b%2Fjson_traverse/lists"}