filter only active students

This commit is contained in:
Karel Košnar 2024-12-03 15:07:18 +01:00
parent d61d1db745
commit 7fe566156e

View file

@ -1,5 +1,5 @@
!#/bin/bash
cat students.json | jq -c '.Zaci[]|{id: .PkZak, name: .Jmeno, surname: .Prijmeni }' | while read line; do
cat students.json | jq -c '.Zaci[]| select(.AktivniEvidence == true) |{id: .PkZak, name: .Jmeno, surname: .Prijmeni }' | while read line; do
id=$(echo $line | jq -r '.id')
name=$(echo $line | jq -r '.name')
surname=$(echo $line | jq -r '.surname')