Hey, iâm having trouble getting the Moonbirds âLongest Avg Holdâ âLargest Bagâ and âHighest Avg Buy Inâ to display the correct numbers. Currently they are displaying âNaNâ. Iâm at 49:19 in the video.
I added some console.logs to hopefully help debug. would love some insight into where the error is.
async function getCol() {
const res = await axios.get("http://localhost:4000/", {
params: {slug: collection},
});
const data = res.data;
console.log("data",data);
console.log(âdataâ,data);
this prints: data Welcome to the server
const dataArray = Object.values(data);
console.log("dataArray",dataArray);
console.log(âdataArrayâ,dataArray);
this prints:
0: âWâ
1: âeâ
2: âlâ
3: âcâ
4: âoâ
5: âmâ
6: âeâ
etc. prints welcome to the server.
So I guess, it doesnât look like itâs retrieving the correct information from the correct page. I tried manually plugging in the slug etc. into the axios get request but the request gets caught in a promise. Been trying to figure this out for 3 days.
Anyone have insights into how to fix this?