简体   繁体   中英

How to get data from JSON file to JavaScript [on hold]

I have some data on JSON file and I want to get that data to my JavaScript and use DOM to deploy in to HTML. I know how to use JSON, JavaScript, HTML DOM. I want to know how many ways are there to do the thing.

//include json file 
//import JSON in a variable 
//create DOM in variable 
//deploy in html

const jsonObj = require("/json/path.json")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM