This appears to be a large JSON object containing product data for multiple products. I'll provide an example of how you could parse this data using Python.
```python
import json
# Assuming the JSON object is stored in a variable called 'product_data'
product_data = {
"products": [
{
"id": "69210b427d4b03d83b72c710",
"brand": "Urban Arrow",
"name": "FamilyNext Pro",
"price": "$8,999",
"description": "...",
"image_url": "...",
"offers": [
{
"offerUrl": "...",
"price": "$8,999",
"currency": "USD"
}
]
},
{
"id": "69210b427d4b03d83b72c710",
"brand": "Urban Arrow",
"name": "FamilyNext Pro",
"price": "$8,999",
"description": "...",
"image_url": "...",
"offers": [
{
"offerUrl": "...",
"price": "$8,999",
"currency": "USD"
}
]
},
# ... more products ...
]
}
# Extract the product data for each product
products = []
for product in product_data["products"]:
product_info = {
"id": product["id"],
"brand": product["brand"],
"name": product["name"],
"price": float(product["price"].strip("$")),
"description": product.get("description", ""),
"image_url": product["image_url"]
}
# Add any additional details from the 'offers' array
for offer in product.get("offers", []):
product_info["price"] = max(product_info["price"], float(offer["price"].strip("$")))
products.append(product_info)
# Print the extracted product data
for product in products:
print(f"ID: {product['id']}")
print(f"Brand: {product['brand']}")
print(f"Name: {product['name']}")
print(f"Price: ${product['price']:.2f}")
print(f"Description: {product['description']}")
print(f"Image URL: {product['image_url']}")
print()
```
This script extracts the product data for each product, including its ID, brand, name, price, description, and image URL. It also takes into account any additional details from the 'offers' array when determining the final price. The extracted data is then printed to the console.
Please note that this is just one possible way to parse the JSON object, and you may need to modify the script depending on your specific requirements.
```python
import json
# Assuming the JSON object is stored in a variable called 'product_data'
product_data = {
"products": [
{
"id": "69210b427d4b03d83b72c710",
"brand": "Urban Arrow",
"name": "FamilyNext Pro",
"price": "$8,999",
"description": "...",
"image_url": "...",
"offers": [
{
"offerUrl": "...",
"price": "$8,999",
"currency": "USD"
}
]
},
{
"id": "69210b427d4b03d83b72c710",
"brand": "Urban Arrow",
"name": "FamilyNext Pro",
"price": "$8,999",
"description": "...",
"image_url": "...",
"offers": [
{
"offerUrl": "...",
"price": "$8,999",
"currency": "USD"
}
]
},
# ... more products ...
]
}
# Extract the product data for each product
products = []
for product in product_data["products"]:
product_info = {
"id": product["id"],
"brand": product["brand"],
"name": product["name"],
"price": float(product["price"].strip("$")),
"description": product.get("description", ""),
"image_url": product["image_url"]
}
# Add any additional details from the 'offers' array
for offer in product.get("offers", []):
product_info["price"] = max(product_info["price"], float(offer["price"].strip("$")))
products.append(product_info)
# Print the extracted product data
for product in products:
print(f"ID: {product['id']}")
print(f"Brand: {product['brand']}")
print(f"Name: {product['name']}")
print(f"Price: ${product['price']:.2f}")
print(f"Description: {product['description']}")
print(f"Image URL: {product['image_url']}")
print()
```
This script extracts the product data for each product, including its ID, brand, name, price, description, and image URL. It also takes into account any additional details from the 'offers' array when determining the final price. The extracted data is then printed to the console.
Please note that this is just one possible way to parse the JSON object, and you may need to modify the script depending on your specific requirements.