Guest User

Untitled

a guest
May 21st, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. {
  2. "data": [
  3. {
  4. "id": 1,
  5. "name": "John",
  6. },
  7. {
  8. "id": 2,
  9. "name": "Doe",
  10. },
  11. ...
  12. }
  13.  
  14. count=0
  15. id=$(cat example.json | jq -r '.data[$count].id')
  16.  
  17. jq -r ".data[$count].id" example.json
Add Comment
Please, Sign In to add comment