• Filters a JSON array file by a regex applied to each item's stringified form. Matching items are written to -grep.json in destDir.

    Type Parameters

    • T

    Parameters

    • filePath: string

      Input JSON array file.

    • destDir: string

      Destination directory for grep result file.

    • pattern: RegExp

      Regular expression used to match items.

    Returns T[]