#Mobile Ordering App
21 messages · Page 1 of 1 (latest)
Is the itemId what you expect?
Yes ive logged the itemId and it matches to each specific item
ok, so does your console.log(orderedItemObj) give you what you expect?
It gives me undefined
ok then your menuArray doesn't contain the item you're looking for... can you cosole.log(menuArray) to see if the itemId exists in there?
Ok i just did and it does exist
take out the array reference and log orderedItemObj (without the [0]) to see if the filtered list contains the item)
wait
is the itemId a string?
console.log(typeof itemId)
I'll be it is... and I'll also be item.id is a number...
in JS "3" does NOT === 3
but "3" DOES == 3
so you probably need to change return item.id === itemId to return item.id == itemId
thank you
np
I was starting to lose my mind lol