{"id":21558148,"url":"https://github.com/koopjs/koop-output-flat","last_synced_at":"2025-03-18T03:28:02.942Z","repository":{"id":147714935,"uuid":"168595532","full_name":"koopjs/koop-output-flat","owner":"koopjs","description":"Convert GeoJSON to a flattened JSON array","archived":false,"fork":false,"pushed_at":"2022-12-09T21:13:22.000Z","size":4,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-24T10:47:17.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koopjs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-31T20:56:57.000Z","updated_at":"2019-06-13T20:11:17.000Z","dependencies_parsed_at":"2023-05-27T05:45:16.427Z","dependency_job_id":null,"html_url":"https://github.com/koopjs/koop-output-flat","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/koopjs%2Fkoop-output-flat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-flat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-flat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-flat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koopjs","download_url":"https://codeload.github.com/koopjs/koop-output-flat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244149177,"owners_count":20406324,"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":[],"created_at":"2024-11-24T08:14:06.292Z","updated_at":"2025-03-18T03:28:02.937Z","avatar_url":"https://github.com/koopjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koop-output-flat\nThis output-services plugin converts GeoJSON properties to a \"flat\" json array.  Geometry is stripped. Any nested GeoJSON properties are moved to the root level and given keys that are a path to their original nested location. For example, the following GeoJSON:\n\n```\n{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {\n        \"keywords\": [\"place\", \"residence\"],\n        \"address\": {\n          \"street\": \"187 Suffolk Ln.\",\n          \"City\": \"Boise\"\n          }\n      },\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [\n          -121.14486694336,\n          47.884118004966\n        ]\n      }\n    }\n  ]\n}\n```\n\nwill get converted to:\n\n```\n[\n    {\n        \"keywords.0\": \"place\",\n        \"keywords.1\": \"residence\",\n        \"address.street\": \"187 Suffolk Ln.\",\n        \"address.City\": \"Boise\"\n    }\n]\n```\n\nNote that geometry is omitted from the response\n.\n## Usage\n\nRegister this plugin with koop before your provider plugins to ensure that the `flat` routes are bound to the providers.\n\n```\nconst flat = require('@koopjs/output-flat')\nkoop.register(flat)\n\n// Register providers\n```\n\nAfter startup, Koop will include an `flat` route for each registered provider.  For example, if you had registered the Github provider, the following route would be available:\n\n`/github/:id/flat`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-output-flat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoopjs%2Fkoop-output-flat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-output-flat/lists"}