Title: Support filtering after advanced feature functions like `@array()` (e.g., $.store..*@array()[?(@property !== 0)]) · Issue #246 · JSONPath-Plus/JSONPath · GitHub
Open Graph Title: Support filtering after advanced feature functions like `@array()` (e.g., $.store..*@array()[?(@property !== 0)]) · Issue #246 · JSONPath-Plus/JSONPath
X Title: Support filtering after advanced feature functions like `@array()` (e.g., $.store..*@array()[?(@property !== 0)]) · Issue #246 · JSONPath-Plus/JSONPath
Description: Consider the given sample JSON document { "store": { "book": [{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Ho...
Open Graph Description: Consider the given sample JSON document { "store": { "book": [{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author...
X Description: Consider the given sample JSON document { "store": { "book": [{ "category": "reference", "author": "Nigel Rees", "title": "...
Opengraph URL: https://github.com/JSONPath-Plus/JSONPath/issues/246
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support filtering after advanced feature functions like `@array()` (e.g., $.store..*@array()[?(@property !== 0)])","articleBody":"Consider the given sample JSON document \n\n```\n{\n \"store\": {\n \"book\": [{\n \"category\": \"reference\",\n \"author\": \"Nigel Rees\",\n \"title\": \"Sayings of the Century\",\n \"price\": 8.95\n },\n {\n \"category\": \"fiction\",\n \"author\": \"Evelyn Waugh\",\n \"title\": \"Sword of Honour\",\n \"price\": 12.99\n },\n {\n \"category\": \"fiction\",\n \"author\": \"Herman Melville\",\n \"title\": \"Moby Dick\",\n \"isbn\": \"0-553-21311-3\",\n \"price\": 8.99\n },\n {\n \"category\": \"fiction\",\n \"author\": \"J. R. R. Tolkien\",\n \"title\": \"The Lord of the Rings\",\n \"isbn\": \"0-395-19395-8\",\n \"price\": 22.99\n }],\n \"bicycle\": {\n \"color\": \"red\",\n \"price\": 19.95\n }\n }\n}\n```\nJSONPath Plus currently supports advanced feature functions such as \n\n```\n@array(),\n@object() and so on.\n```\n\nThis correctly returns the elements under any node.\n\n**Example JSONPath expression** \n```\n$.store..*@array()\n```\n**Output**\n```\n[\n [\n {\n category: 'reference',\n author: 'Nigel Rees',\n title: 'Sayings of the Century',\n price: 8.95\n },\n {\n category: 'fiction',\n author: 'Evelyn Waugh',\n title: 'Sword of Honour',\n price: 12.99\n },\n {\n category: 'fiction',\n author: 'Herman Melville',\n title: 'Moby Dick',\n isbn: '0-553-21311-3',\n price: 8.99\n },\n {\n category: 'fiction',\n author: 'J. R. R. Tolkien',\n title: 'The Lord of the Rings',\n isbn: '0-395-19395-8',\n price: 22.99\n }\n ]\n]\n```\n\n**Improvement**\nWhen a filter which contains another JSONPath Plus feature ,\n\nExample JSONPath expression\n\n```\n$.store..*@array()[?(@property !== 0)]\n```\n\nJSONPath Plus stops evaluating after @array() and does not process the next filter expression.\nThe second filter block `[?(@property !==0)]`is not processed at all.\n\n**Actual Output**\n```\n[\n [\n {\n category: 'reference',\n author: 'Nigel Rees',\n title: 'Sayings of the Century',\n price: 8.95\n },\n {\n category: 'fiction',\n author: 'Evelyn Waugh',\n title: 'Sword of Honour',\n price: 12.99\n },\n {\n category: 'fiction',\n author: 'Herman Melville',\n title: 'Moby Dick',\n isbn: '0-553-21311-3',\n price: 8.99\n },\n {\n category: 'fiction',\n author: 'J. R. R. Tolkien',\n title: 'The Lord of the Rings',\n isbn: '0-395-19395-8',\n price: 22.99\n }\n ]\n]\n\n```\n\n**Expected Output** : After evaluating @array(), the engine must continue processing the next filters.\n```\n[\n {\n category: 'fiction',\n author: 'Evelyn Waugh',\n title: 'Sword of Honour',\n price: 12.99\n },\n {\n category: 'fiction',\n author: 'Herman Melville',\n title: 'Moby Dick',\n isbn: '0-553-21311-3',\n price: 8.99\n },\n {\n category: 'fiction',\n author: 'J. R. R. Tolkien',\n title: 'The Lord of the Rings',\n isbn: '0-395-19395-8',\n price: 22.99\n }\n]\n```\n\nSo, the pipeline should work like this :\n\n- First it processes `$.store..*@array()` .\n- Then the processed results should be passed to the next filter. In this case, it is `[?(@property !==0)]`\n- Return the final results after processing all the filters","author":{"url":"https://github.com/Laavanja19","@type":"Person","name":"Laavanja19"},"datePublished":"2025-12-08T08:20:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/246/JSONPath/issues/246"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e65b1cf-7681-6436-2a09-bc9e63371c58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 957C:20C3D6:9CE578:CECCB0:696EDD03 |
| html-safe-nonce | 75dc23dc4735d6f631fc7bdd171c1c4e1d13eaa590b2ba9c999145fb6d245a81 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTdDOjIwQzNENjo5Q0U1Nzg6Q0VDQ0IwOjY5NkVERDAzIiwidmlzaXRvcl9pZCI6IjIzMDk1MTMzOTEyNDk0ODA5NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7a0b046c2ac8879f992f237ca976dd81804796e34d98b9631a4f55f9f0cd3fa4 |
| hovercard-subject-tag | issue:3705201765 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONPath-Plus/JSONPath/246/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71fcf7d17100f02c395babd801ad1afa163abcb5b4925a14d4750970f10b7a0b/JSONPath-Plus/JSONPath/issues/246 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71fcf7d17100f02c395babd801ad1afa163abcb5b4925a14d4750970f10b7a0b/JSONPath-Plus/JSONPath/issues/246 |
| og:image:alt | Consider the given sample JSON document { "store": { "book": [{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Laavanja19 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-preview |
| go-import | github.com/JSONPath-Plus/JSONPath git https://github.com/JSONPath-Plus/JSONPath.git |
| octolytics-dimension-user_id | 67874603 |
| octolytics-dimension-user_login | JSONPath-Plus |
| octolytics-dimension-repository_id | 1716525 |
| octolytics-dimension-repository_nwo | JSONPath-Plus/JSONPath |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1716525 |
| octolytics-dimension-repository_network_root_nwo | JSONPath-Plus/JSONPath |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width