filtering data using parameters

后端 未结 2 1495
陌清茗
陌清茗 2021-01-25 07:18

I have this command that is working..

cat  ~/Desktop/results.json |  jq \'.[] | .environmentStatuses[].deploymentResult | select(.key.entityKey.key==\"39583746-3         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-25 08:07

    This worked for me :

      jq '.[] | .environmentStatuses[].deploymentResult |
      select(.key.entityKey.key == "'$key'") |
      .lifeCycleState' ~/Desktop/results.json 
    

    --arg does not works as expected ...

提交回复
热议问题