Delete page "jq"
							
								
								
									
										38
									
								
								jq.md
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
										
											
											
										
										
									
								
							
						
						
									
										38
									
								
								jq.md
									
									
									
									
									
								
							| @@ -1,38 +0,0 @@ | |||||||
| ここでは[aios](https://git.syui.ai/ai/os)にインストールされている[jq](https://github.com/jqlang/jq), [dasel](https://github.com/TomWright/dasel)の`example`をまとめます。 |  | ||||||
|  |  | ||||||
| ## null |  | ||||||
|  |  | ||||||
| `id:3`の`name:null`を除外して表示 |  | ||||||
|  |  | ||||||
| ```json |  | ||||||
| [ |  | ||||||
|   { |  | ||||||
|     "id": 1, |  | ||||||
|     "name": "aios", |  | ||||||
|     "display": "ai os" |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     "id": 2, |  | ||||||
|     "name": "archlinux", |  | ||||||
|     "display": "Arch Linux" |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     "id": 3, |  | ||||||
|     "display": "Linux Kernel" |  | ||||||
|   } |  | ||||||
| ] |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ```sh |  | ||||||
| $ echo $json|jq -r ".[]|{name, display}|select(.name | length > 0)|.name,.display" |  | ||||||
| aios |  | ||||||
| ai os |  | ||||||
| archlinux |  | ||||||
| Arch Linux |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ```sh |  | ||||||
| $ echo $json|jq -r ".[]|.name // empty" |  | ||||||
| aios |  | ||||||
| archlinux |  | ||||||
| ``` |  | ||||||
		Reference in New Issue
	
	Block a user