Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 576

Syntax for extracting data from JSON [closed]

$
0
0

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 576


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>