Allow accessing nested JSON properties in UI filters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Is your feature request related to a problem?
The UI property filter picker doesn't natively support drilling into nested JSON objects. It only surfaces top-level properties.
Specifically, I'm trying to create a dynamic cohort based on a nested JSON attribute in a person property (e.g., profile.user_type) , but I can only select the top-level property (profile). The UI cohort config does not have a SQL expression option.
Describe the solution you'd like
- Selecting a property that is a JSON object should then surface its attributes as filterable properties
or - Make sure SQL is an option everywhere properties can be selected as filters/criteria
Describe alternatives you've considered
Flattening all JSON objects
Additional context
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019f75e6-9eb6-7dbb-9b27-19cf0a0f2b4f?t=2780
Admin (internal): http://go/adminOrgUS/01962554-e342-0000-4942-7fa64a8d395f (project ID 483452)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the UI property filter picker and cohort configuration described in the issue, tracing how top-level JSON properties become selectable filters. Compare the two proposed approaches—surfacing nested attributes or enabling SQL criteria—and define completion as supporting nested JSON filtering in the relevant UI flow.
Written by the indexing model from the issue text.
Assessment
- Domain
- analytics, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100