skip to Main Content

Json – jq how to get all parents of a specific child

Hello I've the following json and try to get all parents who have the "linux-image-amd64" { "web-prode-01.example.de": "ERROR: Problem encountered installing package(s). Additional info follows:nnchanges:n ----------n linux-image-amd64:n ----------n new:n old:n 6.1.55-1nerrors:n - Running scope as unit: run-rad31bddd35ec452b9d67fef004ce3daf.scopen E: Sub-process /usr/bin/dpkg…

VIEW QUESTION

Json – Use jq to convert object to sorted array

I have the following JSON object. { "1eba648810a9": { "ID": "1eba648810a9", "Tag": "1.0.237" }, "2df272728204": { "ID": "2df272728204", "Tag": "1.0.243" }, "2f5a63db6634": { "ID": "2f5a63db6634", "Tag": "1.0.179" }, "91a86fec59b1": { "ID": "91a86fec59b1", "Tag": "1.0.202" }, "9aa95de44891": { "ID": "9aa95de44891", "Tag":…

VIEW QUESTION

Ubuntu – How to get the image name and version from manifest.json

This is a manifest.json generated by "docker save" on Ubuntu: [ { "Config":"a5a29aeb4d6a28cb5a0b759572ae5696f0a99a4be39aa4de08d8a897e6d12b95.json", "RepoTags":["hello/world:latest"], "Layers":["b0e93b0b2e63771ea0cd34f350681b4397c804e5ed5ba01aec23cfaf6c49bc51/layer.tar","f9b7caaf240b159e636f77a9571073f6e4d5a0541d864ec64e4e2808b282e302/layer.tar","1355029c32eee25981e17b0e89e946d9346cffdff29ff53858104ebfe6728d80/layer.tar","362092bb6a9ed18c0e88a9b1635e7c16914661935ce64f1b581d19fd5226463a/layer.tar","fe2bde379de2f44bb47d5d75a25294485f70d8b4c7a99a08b0fcef8f4076914d/layer.tar","4acfd2b9473bf5c17f50ad2ff04c148b1be79d1174509e0fb10d27ba8cff9294/layer.tar","e5131e82e66e45e002a88618254c1cde43a497d8a94fcb5d9b20171f19b15b96/layer.tar"] } ] I want to use "jq" to get the docker image name and version from "RepoTags": jq -e -r ".RepoTags" manifest.json Here is the…

VIEW QUESTION

JQ filter for a single JSON file

I have a file containing { "solr.jetty": { "org.eclipse.jetty.server.handler.DefaultHandler.requests": { "count": 432742, "meanRate": 0.1393530774422645, "1minRate": 0.1582358234691172, "5minRate": 0.24472281886082692, "15minRate": 0.32856666658514566, "min_ms": 0, "max_ms": 124, "mean_ms": 19.05039312538189, "median_ms": 1, "stddev_ms": 27.68447649619781, "p75_ms": 61, "p95_ms": 63, "p99_ms": 64, "p999_ms": 67 } }…

VIEW QUESTION

Merge json objects into one

I'm trying to merge some json objects using jq. It seems to complicated for me ^^ I have a json which looks like this [ { "name": "test_name", "cpu": "1", "ip": "192.168.0.1", "kv_key": "test2_key", "kv_value": "test2_value", "location": "here" }, {…

VIEW QUESTION
Back To Top
Search