skip to Main Content

How to Iterate Json key value pair and get the value and store in another json using Bash Script with JQ utility – Amazon web services

Im writing bash script for AWS Secret Manager . Question: I have one aws secret manager it will contain multiple secret Example: aws secretsmanager get-secret-value --secret-id Example | jq -r ".SecretString" input.json {"Username":"admin","Password":"admin","Endpoint":"localhost","DatabaseName":"example","Port":"3306"} Using this command got a json output…

VIEW QUESTION

jq, getting an unknown parent node after finding it with one of its children value – Ubuntu

I have a complex (at least for me) issue with jq, and this structure : { "os": { "ubuntu": { "16.04": { "codename": "xenial", "bootstrap": "preseed", "guest_type": "ubuntu64Guest", "iso_name": "ubuntu-16.04.7-server-amd64.iso", "iso_checksum": "9bb30a2ea6466b0c02aacfa96f6e3516", }, "18.04": { "codename": "bionic", "bootstrap": "preseed", "guest_type":…

VIEW QUESTION

jq streaming eats first element, why? – Ubuntu

When using jq in streaming mode (because 100 GB file) it eats the first element. How can I avoid that? echo [{"id":482,"a":"2","b":1},{"id":483,"a":"3","b":2}] | jq -c --stream "fromstream(1|truncate_stream(inputs))" Output is {"a":"2","b":1} {"id":483,"a":"3","b":2} The first element (id) is missing from the first…

VIEW QUESTION
Back To Top
Search