Обрезанное начало JSON-файла workflowytest.json:
[
{
"id": "7a813f1d-1725-199e-8d52-5136e6dddb61",
"nm": "Юриспруденция",
"ct": 287,
"metadata": {},
"lm": 148423966,
"ch": [
{
"id": "a735e988-c551-ad15-eb12-3c1c67d06f71",
"nm": "ius romanum",
"ct": 61997710,
"metadata": {},
"lm": 66069326,
"ch": [
{
"id": "f5e05a96-2ed6-fc5b-0f0b-83a8b91265ca",
"nm": "Rechtsquellen",
"ct": 66069334,
"metadata": {},
"lm": 66069334,
"ch": [
{
"id": "b9d35b53-d58b-bc44-5f25-342de45f527b",
"nm": "ius civile",
"ct": 66069334,
"metadata": {},
"lm": 66069334,
"ch": [
{
"id": "2cdad0f8-4f75-e380-4d6a-adf036dce3f9",
"nm": "mos maiorum (Gewohnheitsrecht)",
"ct": 66069349,
"metadata": {},
"lm": 66069349
},
{
"id": "fc56ce8c-27fd-fac3-eec1-a9cc8821c4ef",
"nm": "Einzelgesetze",
"ct": 66075170,
"metadata": {},
"lm": 66075170,
"ch": [
{
"id": "341fbe97-94f7-4c0c-e1ed-b4f44197fc40",
"nm": "leges",
"ct": 66075230,
"metadata": {},
"lm": 66075230
},
{
"id": "e306b8ab-9bd1-f6e9-20d2-2ea004a80165",
"nm": "plebiscita",
"ct": 66075230,
"metadata": {},
"lm": 66075230
}
]
},
{
"id": "e7d85200-bea1-dd32-0cfa-586c901b2acf",
"nm": "sentus consulta (Senatbeschlüsse)",
"ct": 66075176,
"metadata": {},
"lm": 66075257
}
]
},
{
"id": "59bcbceb-addb-adbf-2434-d3b53e798445",
"nm": "ius honorarum",
"ct": 66069342,
"metadata": {},
"lm": 66069342,
"ch": [
Хочу при помощи jq отобразить значение "nm"
для элемента со значением "id" : "a735e988-c551-ad15-eb12-3c1c67d06f71"
.
cat workflowytest.json | jq '.[] | select(.id == "a735e988-c551-ad15-eb12-3c1c67d06f71") | .nm'
Не выводит ничего.