{"id":20745444,"url":"https://github.com/elasticio/filter-component","last_synced_at":"2025-07-31T06:33:23.375Z","repository":{"id":18953849,"uuid":"78765269","full_name":"elasticio/filter-component","owner":"elasticio","description":"Filtering component for elastic.io iPaaS","archived":false,"fork":false,"pushed_at":"2023-01-09T21:39:08.000Z","size":535,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-11T12:52:02.806Z","etag":null,"topics":["eio-component"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elasticio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T16:38:52.000Z","updated_at":"2022-11-12T07:03:02.000Z","dependencies_parsed_at":"2023-01-11T20:30:21.239Z","dependency_job_id":null,"html_url":"https://github.com/elasticio/filter-component","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/elasticio/filter-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticio%2Ffilter-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticio%2Ffilter-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticio%2Ffilter-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticio%2Ffilter-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elasticio","download_url":"https://codeload.github.com/elasticio/filter-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticio%2Ffilter-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267997998,"owners_count":24178434,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["eio-component"],"created_at":"2024-11-17T07:20:30.658Z","updated_at":"2025-07-31T06:33:23.331Z","avatar_url":"https://github.com/elasticio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filter Component [![NPM version][npm-image]][npm-url] ![circle-url]\n\n## Description\n\nA component to filter the incoming data based on an arbitrary JSONata expression.\n\n## How it works\n\nFilter will pass through the incoming data if it matches the JSONata condition specified\nin the configuration. The expression can be any valid __JSONata__ expression, so you can be creative.\nHere are some examples that are possible:\n\n*   `true`\n*   `false`\n*   `$not(false)`\n*   `$not(true)`\n*    `20 \u003e 5`\n*   `body.foo` - will be true if `body.foo` is defined and not `false`\n\n## Requirements\n\n### Environment variables\n\nBy default no environment variable is necessary to operate the component.\n\n## Triggers\n\nThis component has no trigger functions, so it is not selectable as a trigger (first step in an integration flow).\n\n## Actions\n\n### Simple JSONata Filter\n\nThis action has two parameters and a checkbox:\n\nParameters:\n*   `Filter condition` - A __JSONata__ expression passed in through the cfg. The expression will be evaluated to a value of  `true` or `false`. If \nit is evaluated to `false`, a message will be logged to the console and the msg will not be sent forward to the next component. If evaluated `true`, a message will be passed forward along with all data that passed the condition.\n\nCheckbox:\n* If checked, the checkbox adds `Assertion` functionality. Instead of doing nothing, the component will throw an error when the condition is not met.\n\n* `Metadata To Response` Adding passthrough from a previous step to message body as `elasticioMeta` variable, if enabled.\n\n## Additional Notes\n\n*   The JSONata Filter expression can be a valid expression however it can cause an error to be thrown if it is invalid based on the context. For example, \n`$number(hello) \u003e 5` where `hello: \"world\"`. This JSONata expression is valid but an error will be thrown as `hello` is NaN.\n \n## License\n\nApache-2.0 © [elastic.io GmbH](https://www.elastic.io)\n\n\n[npm-image]: https://badge.fury.io/js/filter-component.svg\n[npm-url]: https://npmjs.org/package/filter-component\n[circle-url]: https://circleci.com/gh/elasticio/filter-component.svg?style=svg\n[daviddm-image]: https://david-dm.org/elasticio/filter-component.svg?theme=shields.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticio%2Ffilter-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felasticio%2Ffilter-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticio%2Ffilter-component/lists"}