I’m curious if anyone has ideas that I haven’t thought of for how to display the following API data in a table format. Ideally each colorName would only display once, and the corresponding sizeName and qty would be organized in a table (example below):
[
{
"skuID_Master": 1665950,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "XS",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 167,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 167,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-72"
}
]
},
{
"skuID_Master": 1665957,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "S",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 426,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 426,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 1665964,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "M",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 1665971,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "L",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 1665978,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "XL",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 1665985,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "2XL",
"mapPrice": 5.32,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 1665992,
"styleName": "3600",
"colorName": "Antique Gold",
"colorSwatchImage": "Images/ColorSwatch/16682_fm.jpg",
"colorFrontImage": "Images/Color/72026_f_fm.jpg",
"sizeName": "3XL",
"mapPrice": 6.57,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 56,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 56,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-540"
}
]
},
{
"skuID_Master": 194046,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "XS",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 181,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 181,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:None"
}
]
},
{
"skuID_Master": 194067,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "S",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 194088,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "M",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 194109,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "L",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 194130,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "XL",
"mapPrice": 4.05,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 500,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 500,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 194151,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "2XL",
"mapPrice": 5.32,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 397,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 397,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-1000+"
}
]
},
{
"skuID_Master": 199066,
"styleName": "3600",
"colorName": "Banana Cream",
"colorSwatchImage": "Images/ColorSwatch/12116_fm.jpg",
"colorFrontImage": "Images/Color/40990_f_fm.jpg",
"sizeName": "3XL",
"mapPrice": 6.57,
"caseWeight": 0,
"caseWidth": 0,
"caseLength": 0,
"caseHeight": 0,
"qty": 131,
"countryOfOrigin": "HN, NI, MX, KH",
"warehouses": [
{
"qty": 131,
"fullCaseOnly": false,
"returnable": true,
"expectedInventory": "EnRoute:None|OnOrder:TBD-360"
}
]
I’ll be utilizing 3rd party API’s for most of this so I don’t have access to how the database is formatted. Each product page will have unique colors, sizes, and quantities. My goal is to have live QTY show for colorName and each sizeName on page load. Sometimes there are 60+ colorName options each with sizeName ranging from XS-5XL, so there will be a lot of variables.
Ideally, this is how it should be displayed, with each colorName only showing once and the individual sizeName’s and corresponding qty displayed next to them:
I am able to pull in the information with the API, but I can’t figure out how to organize and display it in the proper format.
Does anyone have an idea of how to accomplish this? I’ve tried RG, but keep running into roadblocks. It seems like it should be simple but I’m just not wrapping my mind around it.
Thank you!