JSON TO JavaScript | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

JSON TO JavaScript

so how do i exactly get data from a local json file // below is the json example [ { "views": 0 } ]

24th Jul 2022, 7:20 AM
Tomoe
Tomoe - avatar
1 ответ
+ 5
let obj = JSON.parse(yourJsonString) You should definitely learn how to google basic stuff. You literally get the answer by googling "JavaScript JSON". No matter which search result on the first page you click, they all answer your question.
24th Jul 2022, 7:51 AM
Alex
Alex - avatar