i have following set of key value pairs in redis
"690-product-qwaf@#45" :"mens-clothing/shirts" "690-product-ywsg##67" :"womens-clothing/shirts" "690-product-wsrf@%59" : "boys-clothing/sweaters" "690-brand-p2af@#45" : "puma" "690-brand-z3af#" : "free people" "690-brand-q4af%#49" : "true religion"
i need fetch keys starting "690-brand-" above set. how can achive same in redis?.
you can scan keys using scan
command of redis. see documentation http://redis.io/commands/scan
example
scan 0 match "690-brand-*"
for node.js example see https://stackoverflow.com/a/37405810/6265117
you can use keys
command if working on development environment or debugging , database not large. link - http://redis.io/commands/keys
note: keys
not recommended production environments.
Comments
Post a Comment