{"id":29554194,"url":"https://github.com/posthog/flatten-properties-plugin","last_synced_at":"2025-07-18T07:08:29.550Z","repository":{"id":46070953,"uuid":"340398530","full_name":"PostHog/flatten-properties-plugin","owner":"PostHog","description":"Flatten event properties to easily access them in filters.","archived":false,"fork":false,"pushed_at":"2024-09-04T07:16:48.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T21:29:43.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://posthog.com/plugins/property-flattener","language":"JavaScript","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/PostHog.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":"2021-02-19T14:45:20.000Z","updated_at":"2025-03-28T21:19:08.000Z","dependencies_parsed_at":"2024-05-01T14:27:48.869Z","dependency_job_id":"5e2a6515-993d-42a5-855d-18ab32783801","html_url":"https://github.com/PostHog/flatten-properties-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PostHog/flatten-properties-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fflatten-properties-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fflatten-properties-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fflatten-properties-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fflatten-properties-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostHog","download_url":"https://codeload.github.com/PostHog/flatten-properties-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fflatten-properties-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265716309,"owners_count":23816354,"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":"2025-07-18T07:08:28.836Z","updated_at":"2025-07-18T07:08:29.543Z","avatar_url":"https://github.com/PostHog.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Property Flattener Plugin\n\n\u003e [!WARNING]  \n\u003e This plugin has been deprecated. You can use [HogQL](https://posthog.com/docs/hogql) to access nested properties in PostHog.\n\nFlatten nested properties in PostHog events to easily access them in filters.\n\n## Example\n\nFor example, if you're an online retailer, and have `purchase` events with the following property structure:\n\n```json\n{\n    \"event\": \"purchase\",\n    \"properties\": {\n        \"product\": {\n            \"name\": \"AZ12 shoes\",\n            \"type\": \"footwear\",\n            \"size\": {\n                \"number\": 12,\n                \"gender\": \"M\"\n            }\n        }\n    }\n}\n```\n\nThis plugin will keep the nested properties unchanged, but also add any nested properties at the first depth, like so:\n\n```json\n{\n    \"event\": \"purchase\",\n    \"properties\": {\n        \"product\": {\n            \"name\": \"AZ12 shoes\",\n            \"type\": \"footwear\",\n            \"size\": {\n                \"number\": 12,\n                \"gender\": \"M\"\n            }\n        },\n        \"product__name\": \"AZ12 shoes\",\n        \"product__type\": \"footwear\",\n        \"product__size__number\": 12,\n        \"product__size__gender\": \"M\"\n    }\n}\n```\n\nAs such, you can now filter your purchase events based on `product__size__number` for example. \n\nThe default separator for nested properties is two subsequent underscores (`__`), but you can also change this to:\n\n* `.`\n* `\u003e`\n* `/`\n\nWhen picking your separator, make sure it will not clash with your property naming patterns. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fflatten-properties-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthog%2Fflatten-properties-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fflatten-properties-plugin/lists"}