V
V
Vpolotske2018-12-16 15:20:21
JavaScript
Vpolotske, 2018-12-16 15:20:21

Parsing a JSON string?

I want to update content via ajax.
There is a response from the server in the form of json
{"id":"1","buy":"Buy"},{"id":"2","buy":"Buy"},{"id":"3 ","profit":"Withdraw"},{"id":"4","profit":"Withdraw"},{"id":"5","time":"1 minute"}
On page div blocks are added in a while loop. How do I add values ​​with id 1 to div 1, 2 to div 2, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bqio, 2018-12-16
@bqio

Either use vanilla JS or use a simple construct in VueJS: In general, who stores data this way?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question