diff --git a/garfbot.py b/garfbot.py index d954fda..fdc6b22 100644 --- a/garfbot.py +++ b/garfbot.py @@ -232,7 +232,7 @@ async def on_message(message): products = product_query['data'] sorted_products = sorted(products, key=lambda item: item['items'][0]['price']['regular']) response = f"Prices for `{product}` at `{store_name}` near `{zipcode}`:\n" - for item in products: + for item in sorted_products: product_name = item['description'] price = item['items'][0]['price']['regular'] response += f"- `${price}`: {product_name}: \n"