Shizuru
Shizuru4mo ago

Type 'unknown' when trying to use API

Hi, i'm trying to use API from openfoodfacts. I've followed the tutorial but still getting error "Property 'product_name' does not exist on type 'unknown' ". I've tried various options but the closest one is when my result in test mode shows {"name": undefined}. Any help would be appreciated 🥹
No description
No description
No description
Solution:
@Shizuru You'll require to pass the barcode as key and the actual barcode in the value then test. Ensure you match the key as it is case sensitive.
No description
Jump to solution
2 Replies
AI Support
AI Support4mo ago
AI Support Bot Information
<@552547702609805322> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
Solution
Gaurav Chadha
Gaurav Chadha4mo ago
@Shizuru You'll require to pass the barcode as key and the actual barcode in the value then test. Ensure you match the key as it is case sensitive.
No description