WhereFieldEquals

Returns all items from the list where their given field attribute is equal to the equalTo argument.

For example, !WhereFieldEquals with the following arguments:

  • value=[{ name: '192.1,0.82', type: 'IP' }, { name: 'myFile.txt, type: 'File' }, { name: '172.0.0.2', type: 'IP' }]
  • field='type'
  • equalTo='IP'
  • getField='name'

This will eturn all item names where field type equals IP - ['192.1,0.82', '172.0.0.2'].

Script Data


NameDescription
Script Typejavascript
Tagstransformer, general, entirelist

Inputs


Argument NameDescription
valueThe list to apply the transformer to.
fieldThe attribute in the collection items to check equality against equalTo.
equalToThe value to filter all items by in the collection.
getFieldThe field to extract from each item (Optional).

Outputs


There are no outputs for this script.