skip to Main Content

Find launch template based on tags – Amazon Web Sevices

I'm trying to get the launch template VersionNumber based on the deployment_version tag. aws ec2 describe-launch-template-versions --launch-template-id lt-1234 Will return something like { "LaunchTemplateVersions": [ { "LaunchTemplateId": "lt-1234", "LaunchTemplateName": "api", "VersionNumber": 16, "LaunchTemplateData": { "TagSpecifications": [ { "ResourceType": "instance", "Tags":…

VIEW QUESTION

Mapping two json with jq and script bash

I have a json file list_values.json with array of json with an "origine" field : [ { "origine": "reason1", "identifiant": "1234_AAA" }, { "origine": "reason3", "identifiant": "5678_BBB" } ] I have mapping.json file with a list of predefined fields :…

VIEW QUESTION

How do efficiently replace node values depending on some conditions of sub nodes? – Debian

The following json is extracted from a json file in CycloneDX format produced by Syft tool over a debian:bulleye-slim docker image. { "bomFormat": "CycloneDX", "components": [{ "name": "bsdutils", "version": "1:2.36.1-8+deb11u1", "purl": "pkg:deb/debian/bsdutils@1:2.36.1-8+deb11u1?arch=amd64&upstream=util-linux%402.36.1-8+deb11u1&distro=debian-11", "properties": [{ "name": "syft:metadata:source", "value": "util-linux" }, {…

VIEW QUESTION

Json – Create a hash of arrays from CSV with jq

I have the following CSV (truncated): "adfebb","a-f-A-M-F-R-Z","95-00123","C560","USAF" "ae0133","a-f-A-M-F-R-Z","97-00102","C560","USAF" I need the following JSON: { "adfebb":["a-f-A-M-F-R-Z","95-00123","C560","USAF"], "ae0133":["a-f-A-M-F-R-Z","97-00102","C560","USAF"] } I have been tinkering with jq and came close but I haven't managed to get it just right. What I currently have is:…

VIEW QUESTION
Back To Top
Search