{"id":21973665,"url":"https://github.com/alash3al/dart-path-selector","last_synced_at":"2025-04-28T14:27:13.857Z","repository":{"id":56836548,"uuid":"448399882","full_name":"alash3al/dart-path-selector","owner":"alash3al","description":"extract values from Map/List using dot-seprated strings you don't have to cast multiple times to fetch a simple values, this is very useful while working with i.e json data","archived":false,"fork":false,"pushed_at":"2022-01-17T08:17:35.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T10:33:40.134Z","etag":null,"topics":["dart","flutter","json","selector"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/path_selector","language":"Dart","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/alash3al.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":"2022-01-15T21:57:17.000Z","updated_at":"2023-08-30T09:58:33.000Z","dependencies_parsed_at":"2022-08-28T21:11:43.645Z","dependency_job_id":null,"html_url":"https://github.com/alash3al/dart-path-selector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fdart-path-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fdart-path-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fdart-path-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fdart-path-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alash3al","download_url":"https://codeload.github.com/alash3al/dart-path-selector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251328794,"owners_count":21571979,"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","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":["dart","flutter","json","selector"],"created_at":"2024-11-29T15:34:01.404Z","updated_at":"2025-04-28T14:27:13.835Z","avatar_url":"https://github.com/alash3al.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- \nThis README describes the package. If you publish this package to pub.dev,\nthis README's contents appear on the landing page for your package.\n\nFor information about how to write a good package README, see the guide for\n[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). \n\nFor general information about developing packages, see the Dart guide for\n[creating packages](https://dart.dev/guides/libraries/create-library-packages)\nand the Flutter guide for\n[developing packages and plugins](https://flutter.dev/developing-packages). \n--\u003e\n\nSimply extract required values from specific paths in a `Map` or a `List`, for now it works for strings keys\n\n\n## Usage\n\n```dart\nimport 'dart:convert';\n\nimport 'package:path_selector/path_selector.dart';\n\nvoid main() {\n  final Map\u003cString, dynamic\u003e map = jsonDecode('''\n    {\n      \"name\": \"Mohamed Al Ashaal\",\n      \"age\": 28,\n      \"contacts\": {\n        \"email\": \"m7medalash3al@gmail.com\",\n        \"facebook\": \"https://fb.me/alash3al\",\n        \"github\": \"https://github.com/alash3al\"\n      },\n      \"some.dot-key.included\": \"Works!\",\n      \"skills\": [\n        {\n          \"name\": \"PHP\",\n          \"rating\": 0.9\n        },\n        {\n          \"name\": \"Golang\",\n          \"rating\": 0.9\n        },\n        {\n          \"name\": \"Python\",\n          \"rating\": 0.9\n        }\n      ]\n    }\n    ''');\n\n  // will print: Mohamed Al Ashaal\n  print(map.select(\"name\"));\n\n  // will print: 20\n  print(map.select(\"age\"));\n\n  // will print: m7medalash3al@gmail.com\n  print(map.select(\"contacts.email\"));\n\n  // will print: [{name: PHP, rating: 0.9}, {name: Golang, rating: 0.9}, {name: Python, rating: 0.9}]\n  print(map.select(\"skills\"));\n\n  // will print {name: PHP, rating: 0.9}\n  print(map.select(\"skills.#0\"));\n\n  // will print: PHP\n  print(map.select(\"skills.#0.name\"));\n\n  // will print: null\n  print(map.select(\"skills2.unknown_key.value\"));\n\n  // will print: Works!\n  print(map.select(\"some\\\\.dot-key\\\\.included\"));\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falash3al%2Fdart-path-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falash3al%2Fdart-path-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falash3al%2Fdart-path-selector/lists"}