I’m trying to use the importJSON script to get product information from my online inventory management system into a Google Sheet. When I pull data for just one product, everything works fine. But when I try to get a complete list of all products, I get back an array with objects that I can’t figure out how to display properly.
Working formula for single item:
=ImportJSONBasicAuth("https://api.inventorymanager.com/v2/products.json?search=prod-2045","myApiKey","myPassword")
Problem formula for multiple items:
=ImportJSONBasicAuth("https://api.inventorymanager.com/v2/products.json?limit=50&page=1","myApiKey","myPassword","/products")
The second formula gives me this result:
| Total | CurrentPage | TotalPages | Products | IsCached |
|---|---|---|---|---|
| 2456 | 1 | 25 | [object Object],[object Object],[object Object] | FALSE |
I can see the data I need is inside those objects but I don’t know how to extract it. Here’s what the JSON structure looks like:
{
"total": "2456",
"currentPage": "1",
"totalPages": "25",
"products": [
{
"title": "Battery Pack - TITAN - Golf Cart Model - Lithium Ion",
"stock": 5,
"reserved": 1,
"incoming": 0,
"minLevel": 3,
"costPrice": 285,
"sellPrice": 650,
"details": "Battery Pack - TITAN - Golf Cart Model - Lithium Ion",
"partNumber": "TIT-405070030-LITHIUM",
"serialNum": "",
"productId": 3247,
"upc": "TIT-405070030-LITHIUM",
"isActive": 1,
"uuid": "2a5c7439-45b0-3d2c-bc18-2ef4281534e8",
"categoryUuid": "51032310-05a7-3284-8670-37840b7e0bcd",
"warehouseUuid": "4e602afc-cb63-3e4b-a7c5-260c1b7e100a",
"lastUpdated": "2025-05-15T02:25:18+00:00",
"dateAdded": "2025-05-15T02:25:08+00:00"
}
]
}
How can I modify my formula or the script to properly display the individual product data instead of getting those object references?