D
D
danyarubcov2019-01-09 02:58:58
HTML
danyarubcov, 2019-01-09 02:58:58

How to extract data from JSON file to HTML?

Good day to all.
I have a certain database in a *.json file, this is a bot for VK and user data is there.
Now we need to pull all the ID and OWNER variables into the HTML site.
How can this be done? It is necessary that when entering the
Game ID form (In the JSON file this is OWNER), a person writes, for example, 37, and ID 37 of the owner comes out under the form.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
t0ny_sto0rm, 2019-01-09
@t0ny_sto0rm

Javascript fetch API + async/await:
In one line:
Returns data from a json file as an object.
UPD :
If you store data in an array, you can use Array.prototype.map
UPD2 : Required
links:
Fetch API - https://developer.mozilla.org/ru/docs/Web/API/Fetch_API
async / await - https://developer.mozilla. org/en/docs/Web/JavaScri...
Array.prorotype.map - https://developer.mozilla.org/en/docs/Web/JavaScri...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question