Produce an array by filtering an existing array.

      Filter (SourceArray, FilterString [,Switch [,Compare]])

   SourceArray  An array to be filtered

   FilterString A string of characters to find in SourceArray

   Switch       If True include items that match FilterString
                If False include items that don't match FilterString

   Compare      vbBinaryCompare (0), vbTextCompare (1)


arrDemo=Filter(vaVolcanoes, "Cinder cone")
WScript.Echo arrDemo(0)

“To be without some of the things you want is an indispensable part of happiness” ~ Bertrand Russell

Related VBScript commands

Array - Add values to an Array variable.
Equivalent in PowerShell: Hash Tables

Copyright © 1999-2024
Some rights reserved