相关文章推荐
微笑的水桶  ·  以案示警·  1 周前    · 
小胡子的熊猫  ·  事业单位真题 - 知乎·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to filter JSON file after I'm pulling it over Curl using JQ to have only Youtube video "id" printed with jq from Ubuntu shell, with no luck I need to have XEJLuJyxLDE after "id": only , pretty long list and I'm very new to linux and jq. Thanks for help. My command now is which doesn't work curl -s 'https://www.googleapis.com/youtube/v3/videos?chart=mostPopular&locale=RU&maxResults=50&key=MY_API_HERE' --header 'Accept: application/json' | jq ".id"

"kind": "youtube#videoListResponse", "etag": "peo7sRMHdYZRkNABiJLj7xYZ0yo", "items": [ "kind": "youtube#video", "etag": "DrIQh9Tabqk3iak4yonUCzJ3sTk", "id": "XEJLuJyxLDE" "kind": "youtube#video", "etag": "1pZQ8jDaavX6KnOyiFrHQQiZtHo", "id": "jO0luDEHesc" "kind": "youtube#video", "etag": "EJZ20jnqkqp7uTg5krUSK1SQE5s", "id": "ixl31324UxE" "kind": "youtube#video", "etag": "lGhY08GhkmvKFuDL-GWAc0ulq-4", "id": "EoxkdcQAZmQ" "kind": "youtube#video", "etag": "C8wQv894QbhKLeMUH0qR4cVVi7w", "id": "5nFpkCmb8e4" "kind": "youtube#video", "etag": "zgizGmrn5tpxE6x2Yb0Dbuays1E", "id": "tJvCygyNH4I" "kind": "youtube#video", "etag": "WnwrLmfpC1sLxZaQjQdF6LIKrck", "id": "racmy7Y9P4M" "kind": "youtube#video", "etag": "1Ye2Py_uXwlz25tukvCklZK9094", "id": "rDpC8RW6UIQ" "kind": "youtube#video", "etag": "_4CqgWptBzjcBVxNvgZj9Rc60Ws", "id": "ONAZ__UY8Ps" "kind": "youtube#video", "etag": "6Ft6e-4d96bOZz8ICutRq1V9UNs", "id": "RE8VF-mVkhw" "kind": "youtube#video", "etag": "aQQyXts43CxaFmtTIHDgPAPIUnE", "id": "LVze229omm4"

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .