Linux 上解析 json的有效工具  jq

https://stedolan.github.io/jq/manual/

[root@jinkk ~]# cat test.json 
{
    "name": "zhangsan",
    "skill":{
      "a":"good",
      "b":"nice"
    }
}

[root@jinkk ~]# cat test.json | jq '.name'
"zhangsan"

[root@jinkk ~]# cat test.json | jq '.skill.b'
"nice"

 

 

相关文章:

  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案