Answer the question
In order to leave comments, you need to log in
How to correctly insert a value from an object into an element?
json arrives {"name": "Denis" , "name": "Nikolai", "name": "Vladislav", "name": "Eugene", "name": "Alexander" }
And the html markup already has 5 tags <h1>
. It is necessary that the values are written to the elements in order. For example: <h1>Денис</h1>
, <h1>Николай</h1>
, <h1>Владислав</h1>
, <h1>Евгений</h1>
, <h1>Александр</h1>
.
I tried using append, but for some reason, the last value is written to all elements.
How is it syntactically correct to write such a traversal of elements?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question