jqコマンドで要素を削除する方法(del関数) | 瀬戸内の雲のように

jqコマンドで要素を削除する方法(del関数)

Posted: 2019-12-03


スポンサーリンク

目次

はじめに

このブログでは散々書いてきたことですが、linuxで使えるjson操作コマンドとして一番使われているのは jqコマンド だと思います。
今回は今まであまり使ったことがなかった 要素の削除 という方法について書きたいと思います。

 

やりたいこと

以下のようなjsonがあった時、

{
  "users": [
    {
      "name": "mura",
      "age": 30,
      "job": "engineer"
    },
    {
      "name": "ken",
      "age": 31,
      "job": "sales"
    }
  ]
}

以下のように jobだけを消した 結果を得たい

{
  "name": "mura",
  "age": 30
}
{
  "name": "ken",
  "age": 31
}

 

やり方

jqの del という関数を使います。
コマンドは以下の通りです。

# cat users.json | jq '.users[] | del(.job)'

とっても簡単にjsonの中身を整形することができます。

やはりjqは便利です。


スポンサーリンク




コメント一覧

2022/05/20 21:15:01

Czoizbさん

cefuroxime 500mg cost - buy robaxin pills cialis 5mg canada


2022/04/08 02:03:23

Fnenvunnyさん

buy viagra viagra alternatives


2022/04/09 00:29:48

AndaAudircurnさん

tadalafil us tadalafil dosages


2022/04/09 19:49:29

Dbngplugsさん

sildenafil 100mg coupon sildenafil in dogs


2022/04/10 00:25:18

Crnnwongeさん

viagra coupons generic viagra natural alternative to viagra generic viagra review


2022/04/10 02:14:48

Ntfbfplugsさん

generic cialis online generic cialis online


2022/04/11 22:56:47

Fwbnvunnyさん

sildenafil dosage for ed sildenafil com


2022/04/11 21:24:25

Kbwnexictさん

canada brand viagra sildenafil otc us


2022/04/13 14:08:09

Knrnexictさん

canadian online pharmacies that do not require a prescription buy medication without an rx


2022/04/13 14:26:07

Fuupvunnyさん

sildenafil efectos can you buy viagra over the counter in mexico


2022/04/14 10:41:12

AnuoAudircurnさん

top 10 online pharmacy in india my canadian pharmacy online


2022/04/15 07:25:03

Dsnnplugsさん

hot canadian pharmacy review ed drugs canada


2022/04/15 11:14:18

Ckanwongeさん

levitra side effects medications levitra uk online


2022/04/15 14:30:04

Nbttplugsさん

cialis time to work how to get cialis cheaper


2022/04/16 15:29:48

Enrnexictさん

cialis tubs cialis and poppers


2022/04/16 15:05:52

Auupvunnyさん

tadalafil 20 mg tadalafil herbal substitute


2022/04/17 12:18:07

AnnoAudircurnさん

sildenafil soft gel compare viagra prices


2022/04/18 12:07:53

Jtnnplugsさん

stromectol 3mg tablets stromectol for pinworms


2022/04/18 12:45:36

Wevgwongeさん

canadian pharmacy zolpidem n1 canadian pharmacy


2022/04/18 19:14:11

Zbttplugsさん

ivermectin for horses tractor supply ivermectin lice


2022/04/19 23:51:40

Ennsexictさん

100mg generic sildenafil daily viagra pill


2022/04/19 23:57:24

Ahhpvunnyさん

original cialis com cialis purchase online canada


2022/04/20 19:23:06

AnuuAudircurnさん

allmed rx specialty pharmacy reliable rx pharmacy coupon


2022/04/21 18:59:25

Wnsnwongeさん

levitra logo buy levitra online


2022/04/21 19:24:23

Jnnyplugsさん

generic cialis online pharmacy cialis manufactured in canada


2022/04/22 02:30:27

nyyyplugsさん

levitra prescribing info what is levitra 20 mg used for


2022/04/23 04:14:08

Eaaqexictさん

Motrin which canadian pharmacies are legitimate


2022/04/23 04:27:07

Ansnvunnyさん

best indian online pharmacy cooperative pharmacy store locator


2022/04/23 23:52:58

JyhAudircurnさん

online pharmacy australia paypal mexico pharmacy order online


2022/04/24 23:31:50

Jmmplugsさん

canadian pharmacy viagra Cefadroxil


2022/04/24 23:46:55

Wnnhwongeさん

mutual of omaha rx pharmacy canadian prescription pharmacy


2022/04/25 06:39:08

Ntcxplugsさん

advanced rx compounding pharmacy best canadian mail order pharmacy


2022/04/29 16:16:49

Anbnvunnyさん

lerk sildenafil 100 mg how much is sildenafil at walmart https://sildenafilkiol.com/


2022/04/29 16:04:51

Ebbexictさん

pills viagra pharmacy 100mg Malegra DXT plus https://dtupharmyjn.com/


2022/04/30 11:18:46

JyhgAudircurnさん

edenbridge ivermectin where to buy ivermectin for guinea pigs https://stromectolujlo.com/


2022/05/01 10:18:35

Jebplugsさん

generic viagra for sale uk generic viagra 200mg https://sgiviagraikn.com/


2022/05/01 10:24:08

Wnbhwongeさん

vardenafil levitra comparison viagra levitra and cialis https://glevitrargu.com/


2022/05/01 17:25:06

Nndnplugsさん

store number walmart pharmacy lloyds pharmacy online doctor https://jzpharmacyukj.com/


2022/05/03 18:29:17

Ebbeexictさん

pharmacy 365 cialis cheap cialis by post https://dccialisxvf.com/


2022/05/04 04:39:13

Nrunerさん

cheap viagra - purchase viagra pills viagra price


2022/05/04 13:28:49

JolwAudircurnさん

viagra tablets from india can you buy viagra over the counter australia https://aviagrasbt.com/


2022/05/05 11:33:04

Jebnplugsさん

best canadian online pharmacies Topamax


2022/05/05 18:20:37

Nndenplugsさん

how much is levitra levitra experience https://xclevitradb.com/


2022/05/07 21:16:47

syqzpfgrさん

modafinil 100mg without prescription buy modafinil 100mg online


2022/05/08 20:26:10

Qzquyjさん

buy prednisolone 10mg generic - neurontin canada cialis


2022/05/09 12:35:38

Ebbeexictさん

cialis commercial bathtub generic cialis fast shipping https://dccialisxvf.com/


2022/05/09 12:43:54

Anbnvunnyさん

sildenafil wikipedia webmd sildenafil https://sildenafilkiol.com/


2022/05/10 07:18:51

JolwAudircurnさん

viagra cheap online viagra canadian pharmacy online https://aviagrasbt.com/


2022/05/10 21:47:18

smqjsrさん

hydroxychloroquine tablets https://keys-chloroquinehydro.com/


2022/05/11 04:40:03

Jebnplugsさん

pharmacy concept store blue mountain canadian pharmacy


2022/05/11 05:12:11

Wnbhwongeさん

comprar levitra effects levitra side https://glevitrargu.com/


2022/05/11 11:28:07

Nndenplugsさん

levitra cost at walmart levitra 20mg https://xclevitradb.com/


2022/05/11 13:38:09

Nvnxmfさん

order augmentin 625mg generic - augmentin canada cialis walmart


2022/05/11 16:47:57

kvjjoliwさん

buy modafinil pill buy modafinil pill


2022/05/13 15:58:56

EvaleenOaOaさん

do dissertation writing services work
help with masters dissertation
dissertation writing services uk


2022/05/13 20:45:16

Eltgeuさん

order bactrim 960mg online - bactrim 480mg usa us viagra


2022/05/14 14:18:09

MaggeeOaOaさん

dissertation examples
dissertation help service nottingham
dissertation help literature review


2022/05/14 15:09:46

Anbnvunnyさん

roman sildenafil sildenafil half life https://sildenafilkiol.com/


2022/05/15 05:52:15

JeadaytaBさん

Nvbdns Kamagra Gelee https://newfasttadalafil.com/ - Cialis cialis daily Dyhzaj Treatment of fractures involves reduction which is restoration of the bone to its normal position. Viagra Avant Apres Ksgczx https://newfasttadalafil.com/ - daily cialis online Priligy


2022/05/15 09:19:56

RegineOaOaさん

dissertation only phd
help with dissertation proposal
nursing dissertation writing service


2022/05/16 00:27:00

Hwdiaiさん

order cephalexin online - cephalexin 500mg pill order erythromycin 500mg for sale


2022/05/16 08:28:05

Jebnplugsさん

best online international pharmacies prescription drugs itching


2022/05/16 08:29:46

KirstiOaOaさん

doctoral dissertation writing help
the dissertation help
how to start writing a dissertation


2022/05/16 08:42:12

Wnbhwongeさん

levitra generic india levitra generic india https://glevitrargu.com/


2022/05/16 15:15:09

Nndenplugsさん

levitra for women buying generic levitra online https://xclevitradb.com/


2022/05/17 16:20:25

KirstiOaOaさん

dissertation prospectus example
dissertation introduction
ford dissertation fellowship


2022/05/17 21:15:59

Eogfmhさん

sildenafil online order - sildenafil without prescription where to buy stromectol


2022/05/18 05:32:39

lpbagzyaさん

generic modafinil


2022/05/18 10:18:48

pztdljnaさん

order modafinil 200mg sale


2022/05/18 18:04:08

Ebbeexictさん

cheap original cialis cialis on line purchase https://dccialisxvf.com/


2022/05/18 18:22:14

Anbnvunnyさん

does generic sildenafil work maxifort zimax sildenafil 100 mg https://sildenafilkiol.com/


2022/05/19 09:34:09

Nrfqqyさん

order budesonide online cheap - order antabuse 500mg buy antabuse 500mg online


2022/05/19 10:55:55

kkdtdpbtさん

order provigil pills buy modafinil 100mg provigil 100mg over the counter


2022/05/19 13:04:29

JolwAudircurnさん

canada viagra otc cost of 100mg sildenafil https://aviagrasbt.com/


2022/05/19 20:19:39

hvntbiiyさん

modafinil 200mg oral order modafinil 100mg without prescription order provigil 100mg generic


2022/05/19 20:56:50

CharlaOaOaさん

dissertation proposal
dissertation help in chennai
dissertation help nz


2022/05/19 23:46:23

ofhdzvwvさん

erythromycin for dogs low dose erythromycin


2022/05/20 08:46:14

dgupycesさん

provigil online buy modafinil 100mg sale


2022/05/20 11:32:22

Jebnplugsさん

sav rx pharmacy alliance rx specialty pharmacy


2022/05/20 11:46:49

Wnbhwongeさん

levitra vs viagra vs cialis levitra from india https://glevitrargu.com/


2022/05/20 18:26:54

Nndenplugsさん

levitra onset want to buy levitra https://xclevitradb.com/



コメントを投稿する


お名前


コメント内容





TOP back