update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user