Я новичок в Bash и JQ. Я хочу массив всего значения ключа.
я пробовал что-то подобное, но это не работает
jobName=$(echo "$jobResult" | jq '. | to_entries[] | .value.name')
но он дал мне строку вроде этой строки
«Подвал, парковка, строительная площадка 1» «Подвал, парковка, строительная площадка 2»
Input
{
"1": {
"_status_code": 202,
"_status_message": "Accepted",
"id": 4120489,
"parent_id": 0,
"assigned_to_all": false,
"billable": false,
"active": true,
"type": "regular",
"has_children": false,
"billable_rate": 0,
"short_code": "",
"name": "Basement Parking Construction Site 1",
"last_modified": "2019-03-12T10:02:54+00:00",
"created": "2019-03-12T10:02:54+00:00",
"filtered_customfielditems": "",
"required_customfields": [],
"locations": [],
"project_id": 0
},
"2": {
"_status_code": 202,
"_status_message": "Accepted",
"id": 4120491,
"parent_id": 0,
"assigned_to_all": false,
"billable": false,
"active": true,
"type": "regular",
"has_children": false,
"billable_rate": 0,
"short_code": "",
"name": "Basement Parking Construction Site 2",
"last_modified": "2019-03-12T10:02:54+00:00",
"created": "I019-03-12T10:02:54+00:00",
"filtered_customfielditems": "",
"required_customfields": [],
"locations": [],
"project_id": 0
}
Я хочу получить массив всех значений с именем ключа
результат
["Basement Parking Construction Site 1","Basement Parking Construction Site 2"]