How to compress json file

Table of Contents


    For a single file use this:

     jq -c . all_json_words.json > minify_words.json


    to use it in a for loop

    for file in *.json; do
        jq -c . "$file" > "${file%.json}.min.json"
    done

    Join the Conversation

    May 20, 2023

    Search the Blog

    Press ESC to close