我有这个JavaScript /阵列...转换JavaScript数组HTML和追加到表
var prodPrice = { // quantity prices, lowest no. is min qty
"11580294ce6c41e574c7e9efe063bf01": {
minqty: 1,
name: "Diamond Pillar",
imageURL: "",
bigImageURL: "",
prices: [
{price: 79.96, qty: 1},
{price: 75.96, qty: 10},
{price: 72.16, qty: 25},
{price: 70.36, qty: 50},
{price: 68.60, qty: 100}
]
},
"49f398d1cce9093be484eb5afa1c5ed9": {
minqty: 1,
name: "Diamond Pillar",
imageURL: "",
bigImageURL: "",
prices: [
{price: 119.96, qty: 1},
{price: 113.96, qty: 10},
{price: 108.26, qty: 25},
{price: 105.56, qty: 50},
{price: 102.92, qty: 100}
]
}
}
我想抓住从上述阵列的价格,要么它们附加到另一个表作为额外行或创建全新的表是这样的...
1 10 25 50 100
Diamond Pillar 79.96 75.96 72.16 70.36 68.60
Diamond Pillar 119.96 113.96 108.26 105.56 102.92
我希望这是有道理的 - 感谢一如既往的帮助
是的,这是有道理的。这样做!或者你有什么问题?有关您的代码的任何具体问题? – Bergi
为记录,这不是真的是一个阵列 –