Skip to content

A Github action to filter a json array based on an input, and a single or series of patterns

License

Notifications You must be signed in to change notification settings

TheLevelUp/gha-filter-json-array

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filter String Arrays

This action takes in an array of strings, and one or multiple strings to compare to. The data then filters out any item that isn't in the matchers.

Inputs

data (Required)

The string array of data. Default [].

matcher (Required)

The values to filter the data by. Default "".

use-match (Optional)

Whether the output should use the data, or the matcher.

This is useful for getting partial matches, rather than direct matches) Default false.

Outputs

array

The filtered string array.

Example usage

uses: actions/filter-json-array@v1.7
with:
  data: [\"uiLib",\"Model\",\"doc\"]
  matcher: "Hello"

About

A Github action to filter a json array based on an input, and a single or series of patterns

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%