diff --git a/network-to-config.sh b/network-to-config.sh index ab3f795e..b25b72eb 100755 --- a/network-to-config.sh +++ b/network-to-config.sh @@ -13,7 +13,7 @@ JSON_FILE="$BASEPATH/reference-rpc-endpoint.json" # Function to extract values for a given key extract_values() { local key=$1 - cat "$JSON_FILE" | jq -r --arg key "$key" '.[$key] | .default? // .archive? // [] | .[]' + cat "$JSON_FILE" | jq -r --arg key "$key" '.[$key] | if .default then .default[] else [] end, if .archive then .archive[] else [] end' } # Initialize an empty result string