print year and price

This commit is contained in:
Paul Trowbridge 2023-08-30 17:58:29 +00:00
parent cf0f4e7568
commit 86613ab0d6

2
api.ts
View File

@ -41,7 +41,7 @@ router.get('/price_info/part_cust/:partcode/:customer', async (ctx) => {
for (const row of result.rows) { for (const row of result.rows) {
if (typeof row.season === 'object' && row.season !== null) { if (typeof row.season === 'object' && row.season !== null) {
for (const year in row.season) { for (const year in row.season) {
console.log(row.season[year].price_usd) console.log(`${year}: ` + row.season[year].price_usd)
} }
} }
} }