-
Notifications
You must be signed in to change notification settings - Fork 892
Open
Description
package main
import (
"fmt"
"github.com/tidwall/gjson"
)
func main() {
jsonData := `{
"symbols": [
{"symbol": "BTCUSDT", "status": "TRADING", "quoteAsset": "USDT"},
{"symbol": "ETHUSDT", "status": "HALTED", "quoteAsset": "USDT"},
{"symbol": "ATOMBTC", "status": "TRADING", "quoteAsset": "BTC"}
]
}`
result := gjson.Get(jsonData, `symbols.#(status=="TRADING" && quoteAsset=="USDT")#.symbol`)
fmt.Println("过滤结果:", result)
}Hello.
I want to select both Status as Trading and QuoteAsset as USDT symbols, but the result is []. The expected outcome is ["BTCUDT"].
What should I do?
Metadata
Metadata
Assignees
Labels
No labels