parsemap

Extracts all the keys from the map to the field.

Syntax

parsemap [overlay=BOOL] field=TARGET_FIELD
Required Parameters
field=TARGET_FIELD
Field to be parsed in the input data stream. The field's value must be a map type. If the value of the target field is null or is not a map type, the original data is passed as is.
Optional Parameters
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

Extract all key-value pairs as fields from map data in complex fields

json "{'complex': {'id':100, 'name':'Logpresso'} }" | parsemap field=complex