diff --git a/func/ip_func.sh b/func/ip_func.sh index a368094eb..e98d475f6 100644 --- a/func/ip_func.sh +++ b/func/ip_func.sh @@ -475,6 +475,12 @@ ip_user_json_list() { # Print data for field in $fields; do eval value=$field + + # There is outpup + if [ ! -z "$value" ]; then + tpt='yes' + fi + # Checking parrent key if [ "$j" -eq 1 ]; then echo -e "\t\"$value\": {" @@ -492,7 +498,7 @@ ip_user_json_list() { done # If there was any output - if [ -n "$value" ]; then + if [ -n "$tpt" ]; then echo -e "\t}" fi