JSFiddle - React, Tailwind, and code Playground
JavaScript
'use strict';
const product = {
parentID: '700TDSOCOP',
name: 'SoCo Pendant Light',
attributeKey: {
0:{
name: 'socket',
length: 1
},
1:{
name: 'length',
length: 2
},
2:{
name: 'color',
length: 1
},
3:{
name: 'finish',
length: 1
}
},
attributes: {
socket: {
v: {
name: 'Vintage',
length: {
'08': {
name: '8ft',
price: 0,
color: {
B: {
name: 'Black',
finish: {
S: {
name: 'Satin Nickel',
PID: '700TDSOCOPV08BS',
units: 20
},
Z: {
name: 'Antique Bronze',
PID: '700TDSOCOPV08BZ',
units: 19
},
C: {
name: 'Chrome',
PID: '700TDSOCOPV08BC',
units: 18
}
}
},
O: {
name: 'Orange',
finish: {
S: {
name: 'Satin Nickel',
PID: '700TDSOCOPV08OS',
units: 17
},
Z: {
name: 'Antique Bronze',
PID: '700TDSOCOPV08OZ',
units: 16
},
C: {
name: 'Chrome',
PID: '700TDSOCOPV08OC',
units: 15
}
}
},
N: {
name: 'Brown',
finish: {
S: {
name: 'Satin Nickel',
PID: '700TDSOCOPV08PS',
units: 14
},
Z: {
name: 'Antique Bronze',
PID:...