Quantcast
Viewing all articles
Browse latest Browse all 521

Syntax for extracting data from JSON [closed]

I need to extract some info from JSON. My JSON looks like this:

{"pipeline1": {"description": "Desc 1","last_modified": "2023-11-14T09:27:50.235Z","pipeline_metadata": {"version": 1,"type": "logstash_pipeline"    },"username": "user1","pipeline": "code","pipeline_settings": {"pipeline.batch.delay": 50,"pipeline.batch.size": 125,"pipeline.workers": 1,"queue.checkpoint.writes": 1024,"queue.max_bytes": "1gb","queue.type": "memory"    }  }}

Expected output:

{"pipeline": "pipeline1","description": "Desc 1""last_modified": "2023-11-14T09:27:50.235Z""username": "user1""pipeline": "code"}

Is it possible with jq?


Viewing all articles
Browse latest Browse all 521

Trending Articles