WMX Webflow "type error artworks.forEach is not a function"
Options
David Richardson
Member ✭
I am use the concept of the WMX template to display items (artwork images). I believe that the JSON produced by my API in Xano has something janky. " https://x8ki-letl-twmt.n7.xano.io/api:arLEd2EP/artworks "
The API endpoint works in a browser and will display the contents of the table. The JavaScript is basically a copy of the getRestaurants function of xano-webflow-api-simple.js (For brevity I deleted Prakash's comments)[not a function.jpg]I'm not clear if I need to alter the API response or the code in the JavaScript.
"artworks" is an object with an array of 12 objects ["items"] each of which is an array. This is the URL to the pen: https://codepen.io/david78737/pen/yLPmpGo[JSON.jpg]
The API endpoint works in a browser and will display the contents of the table. The JavaScript is basically a copy of the getRestaurants function of xano-webflow-api-simple.js (For brevity I deleted Prakash's comments)[not a function.jpg]I'm not clear if I need to alter the API response or the code in the JavaScript.
"artworks" is an object with an array of 12 objects ["items"] each of which is an array. This is the URL to the pen: https://codepen.io/david78737/pen/yLPmpGo[JSON.jpg]
Comments
-
I think you mean to use
“artworks.items.forEach(item=>{”
on line 28. Does that help?
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback