jqf v1.8.0

jqf v1.8.0

  • Docs
  • Help
  • Blog
  • Languages iconEnglish
    • 日本語

›Documentations

Documentations

  • Install Guide
  • API References
  • Practical Use

Practical Use

With JSON API

You can process JSON value obtained from JSON API with jqf.

First, let's check the example.

$ curl 'https://raw.githubusercontent.com/kamataryo/jqf/main/examples/students.json'
[
  { "id": 1, "name": "Adams", "score": 70 },
  { "id": 2, "name": "Baker", "score": 58 },
  { "id": 3, "name": "Clark", "score": 82 },
  { "id": 4, "name": "Davis", "score": 93 },
  { "id": 5, "name": "Evans", "score": 61 }
]

Then let's pick the scores of them.

$ curl 'https://raw.githubusercontent.com/kamataryo/jqf/main/examples/students.json' | \
  jqf 'students => students.map(student => student.score)'
[
  70,
  58,
  82,
  93,
  61
]

Or you can use shorthand.

$ curl 'https://raw.githubusercontent.com/kamataryo/jqf/main/examples/students.json' | \
  jqf map 'student => student.score'
[
  70,
  58,
  82,
  93,
  61
]
← API References
  • With JSON API
jqf v1.8.0
Documentations
Install GuideAPI referencePractical Use
More
GitHubJqf is Licensed under the MIT License.
Copyright © 2024 kamataryo