Title: $filter('filter')(array, expression) does not work with more than one nested property · Issue #9698 · angular/angular.js · GitHub
Open Graph Title: $filter('filter')(array, expression) does not work with more than one nested property · Issue #9698 · angular/angular.js
X Title: $filter('filter')(array, expression) does not work with more than one nested property · Issue #9698 · angular/angular.js
Description: My Array: var array = [{ length : 10, answerer : { email : 'test@test.com', name : 'test user' } }, { length : 20, answerer : { email : 'admin@admin.com', name : 'admin' } }]; the filter expression: var expression = { answerer : { name :...
Open Graph Description: My Array: var array = [{ length : 10, answerer : { email : 'test@test.com', name : 'test user' } }, { length : 20, answerer : { email : 'admin@admin.com', name : 'admin' } }]; the filter expression...
X Description: My Array: var array = [{ length : 10, answerer : { email : 'test@test.com', name : 'test user' } }, { length : 20, answerer : { email : 'admin@admin.com', name : 'admin&...
Opengraph URL: https://github.com/angular/angular.js/issues/9698
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"$filter('filter')(array, expression) does not work with more than one nested property","articleBody":"My Array: \n\n``` javascript\nvar array = [{\n length : 10,\n answerer : {\n email : 'test@test.com',\n name : 'test user'\n }\n},\n{\n length : 20,\n answerer : {\n email : 'admin@admin.com',\n name : 'admin'\n }\n}];\n```\n\nthe filter expression:\n\n``` javascript\nvar expression = {\n answerer : {\n name : 'test',\n email: 'adm'\n }\n};\n```\n\nThen filtering based on this:\n\n``` javascript\nvar filteredData = $filter('filter')(array, expression)\n```\n\nI expect to get the empty array. However I get the full array, as if no filtering was done !\nBut if I filter on only one element, for example:\n\n``` javascript\nvar expression = { answerer : { email: 'adm' } };\n```\n\nIt works as expected and returns only the second element of array.\n\nI also tried to define differently my filter expression:\n\n``` javascript\nvar expression = { 'answerer.email': 'adm' } };\n```\n\nBut this returns no result at all.\n\nSo it would seem there is a bug when filtering on more than one nested property.\n\nA workaround could be to use a custom comparator functions. Any other ideas (besides flattening my array...) ?\n","author":{"url":"https://github.com/barroudjo","@type":"Person","name":"barroudjo"},"datePublished":"2014-10-20T16:05:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/9698/angular.js/issues/9698"}
| 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:10ee464b-19ca-6395-b3f1-fde257decbe7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9C2:272889:4CE48C:6B29BA:6A587071 |
| html-safe-nonce | d60ccca01fbbf93e2727283dfd5159b1ee548b63edacee55f6b6f665ba9152ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUMyOjI3Mjg4OTo0Q0U0OEM6NkIyOUJBOjZBNTg3MDcxIiwidmlzaXRvcl9pZCI6IjkwNTgzNzc5NDA3OTU0MjA3ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1737e7cd9c7664c31dae2a9ee4dbfcdb529d614cb7ba6926749fb91a32ee3a03 |
| hovercard-subject-tag | issue:46292030 |
| 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/angular/angular.js/9698/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e1c88a9eb4cd5a12c6e375b2f73c27935fe9b8fb9e36a7e4f3bdcaa888739c39/angular/angular.js/issues/9698 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e1c88a9eb4cd5a12c6e375b2f73c27935fe9b8fb9e36a7e4f3bdcaa888739c39/angular/angular.js/issues/9698 |
| og:image:alt | My Array: var array = [{ length : 10, answerer : { email : 'test@test.com', name : 'test user' } }, { length : 20, answerer : { email : 'admin@admin.com', name : 'admin' } }]; the filter expression... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | barroudjo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular.js git https://github.com/angular/angular.js.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 460078 |
| octolytics-dimension-repository_nwo | angular/angular.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 460078 |
| octolytics-dimension-repository_network_root_nwo | angular/angular.js |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width