mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-10-26 04:31:31 +03:00
ajson: add Chinese translation (#9939)
This commit is contained in:
parent
bc1d2b0949
commit
28e3c762f9
20
pages.zh/common/ajson.md
Normal file
20
pages.zh/common/ajson.md
Normal file
@ -0,0 +1,20 @@
|
||||
# ajson
|
||||
|
||||
> 对 JSON 对象执行 JSONPath 操作。
|
||||
> 更多信息:<https://github.com/spyzhov/ajson>.
|
||||
|
||||
- 从文件中读取 JSON 并执行指定的 JSONPath 表达式:
|
||||
|
||||
`ajson '{{$..json[?(@.path)]}}' {{路径/到/文件.json}}`
|
||||
|
||||
- 从标准输入中读取 JSON 并执行指定的 JSONPath 表达式:
|
||||
|
||||
`cat {{路径/到/文件.json}} | ajson '{{$..json[?(@.path)]}}'`
|
||||
|
||||
- 从 URL 中获取 JSON 并计算指定的 JSONPath 表达式:
|
||||
|
||||
`ajson '{{avg($..price)}}' '{{https://example.com/api/}}'`
|
||||
|
||||
- 读取一些简单的 JSON 并计算一个值:
|
||||
|
||||
`echo '{{3}}' | ajson '{{2 * pi * $}}'`
|
Loading…
Reference in New Issue
Block a user