#16 Transforming JSON data into HTML | Fundamentals of NODE JS | A Complete NODE JS Course

preview_player
Показать описание
In this lecture you will learn how to convert JSON data into JavaScript object and how to use it dynamically in HTML document.

Рекомендации по теме
Комментарии
Автор

This topic of replacing content on html structure with javascript is awesome!, ..the staff I have been asking myself for sometime on how its done especially for content management sites

peterkabiru
Автор

Thank you for awesome course! But I keep getting "The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Array" error when send array of objects as a response, what can be the cause? Just stringifying them seems wrong. Btw have this header 'Content-Type': 'text/javascript'.

yocriee
Автор

I have a doubt sir what does this {{%NAME%}} means? why we have used 2 curly brackets and why we have used %% percent sign can you please explain this.

daredevil
Автор

Thanks for the content bro. Can you tell me that in what order I should learn backend node js, express js and then mongo db or first mongo db then node js and then express js?

kuldeepsingh-grrp
Автор

Thanks for this awesome content but what about the annoying commas, why they're not removed ?

EDIT: I found the solution you should remove the comma from join and use join('') instead of join(', ')

wassim-akkari
Автор

@procademy I noticed a small issue where commas were showing up between the products. I fixed this by updating the code so that the products are joined together without any extra characters.

Here's the corrected line:
let productResponseHtml = html.replace("{{%CONTENT%}}", productHtmlArray.join(""));

Thanks for the helpful Node.js tutorial. Looking forward to learning more from your series!

KnowledgeMirrorHindi
Автор

This is similar to making a component reusable in react

sunnydubey
Автор

I am getting this error can you help TypeError: productlisthtml.replace is not a function

Buckanian
welcome to shbcf.ru