parsejson

Parses a JSON string.

Syntax

parsejson [field=TARGET_FIELD] [overlay=BOOL]
Optional Parameter
field=TARGET_FIELD
Field to be parsed in the input data stream (default: line).
overlay=BOOL
Option to control data-overwrite (default: f).
  • t: Outputs both the parsed data and the original data.
  • f: Outputs the parsed data only.

Usage

Parse the JSON text of the line field.

json "{line: ' {\"foo\": \"bar\"}'}" | parsejson