Question: I am referencing this: <https://github.com/bigcommerce/bigcommerce-api-ruby/blob/master/examples/products/product.rb>

Here is the code:

```
# List products
@products = Bigcommerce::Product.all
puts @products

# Get a product
@product = @products[0]
puts Bigcommerce::Product.find(@product.id)

```

I understand the #list products, but it appears that #get a product is just pulling the first item in the array @products and displaying it?

I don't understand this: `Bigcommerce::Product.find(@product.id)`

End goal is to search @products for a specific property value. Like where SKU = some SKU or title = some time or price = some price, etc.

Also, is @products a hash or an array?

So confused. :(

Answer: 
It's simple!

```
ZREM key data;
ZADD key score newdata;

```

You simply cannot UPDATE an element in SET structure. It's not possible by definition! Like I cannot EAT a cup of water, I can only DRINK it ^\_^

Reply if you have any further problems.

By the way, I don't know your application need, but I have a strong feeling that SORTED SET is unsuitable for your application senario.
One does not update a set's (sorted or not) members. You'll have to remove the old member and add the new (updated JSON) in its place with the relevant score. You could wrap this in Lua or a WATCH/MULTI/EXEC block for atomicity.