diff --git a/scripts/geoloc-members-json.sh b/scripts/geoloc-members-json.sh index 82966dc..bf8bb8f 100755 --- a/scripts/geoloc-members-json.sh +++ b/scripts/geoloc-members-json.sh @@ -32,7 +32,9 @@ for i in $DATA_MBR; do continue else isMbr='"isMember": true,' - resultWithMbr=$(echo "$result" | sed "s/\"geoPoint\": {/$isMbr \"geoPoint\": {/g") + userId=$(jaklis id -p $i | jq .idty.username) + userIdFormat="\"userId\": $userId," + resultWithMbr=$(echo "$result" | sed "s/\"geoPoint\": {/$userIdFormat $isMbr \"geoPoint\": {/g") echo "$resultWithMbr," >> $FILE fi done @@ -55,3 +57,5 @@ echo "}" >> $FILE echo "]" >> $FILE [[ -f $FINAL_LOCATION ]] && cat $FILE | jq . > $FINAL_LOCATION + +