From 7fe566156e201d2a649ed4e899943d4faff59798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C5=A1nar?= Date: Tue, 3 Dec 2024 15:07:18 +0100 Subject: [PATCH] filter only active students --- tools/process.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/process.bash b/tools/process.bash index 9041b6d..4193331 100755 --- a/tools/process.bash +++ b/tools/process.bash @@ -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')