List json data in <ul> <li>

Asked

Viewed 154 times

1

Guys, I have a system here that it takes the data in a JSON and lists in an HTML page, but it has the list as follows: it displays only one title and every time I update my browser it displays the next title.

I would like it to be one below the other. Display all titles in ul li.

The code I believe you would list is this one below:

var cemf = cemf || {
  js: {}
};

cemf.js.Interface = function(lista){};

cemf.js.Interface.prototype.GerarItem = function(lista){

    $(' #Titulo') 
     $('#Titulo').html(lista.Titulo);

};

Example of JSON that is passed:

[{"Object":"foto1","Titulo":"Exemplo do titulo 1"},{"Object":"foto2.jpg","Titulo":"Titulo":"Exemplo do titulo 2"}]
  • You can show an example of the json you use?

  • Please post the JSON template.

  • You want to traverse the json with a loop?

  • I edited your question to put JSON on it. To keep things organized, please keep in the question everything that is part of the question and keep in the answers only what you seek to answer the question asked.

  • Leo Letto 6 that even go through a loop

  • @ Leo Letto even isson my director that I would like to make loop

  • Solved your doubt?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.