Skip to content

Fix nested object wildcard projections - #373

Open
ryanchou1994 wants to merge 1 commit into
jmespath:developfrom
ryanchou1994:fix/nested-object-projections
Open

ryanchou1994 wants to merge 1 commit into
jmespath:developfrom
ryanchou1994:fix/nested-object-projections

Conversation

@ryanchou1994

Copy link
Copy Markdown

Nested object projections currently lose their scope. For example, foo.*.bar.* returns None for {"foo": {"a": {"bar": {"baz": 123}}}}, where the expected result is [[123]]. The same problem affects ordinary keys as well as the empty key in #182.

Use the wildcard binding power when parsing the right-hand side of .*, matching the existing bare object wildcard. This keeps subsequent field paths, nested wildcards, and filters inside the projection while preserving flatten and pipe boundaries. Adds 11 compliance cases covering these paths, missing/null values, and mixed list/object projections.

Validation: eight of the new cases fail before the parser change. The full suite passes on macOS with Python 3.14 and Linux with Python 3.13 and 3.14: 1002 passed, 1 skipped in each environment.

Fixes #182.

Copilot AI lite review requested due to automatic review settings September 21, 2026 03:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object with an empty string as key getting handled incorrectly

2 participants