I have stored some data on local storage. I read data on localstorage with
localStorage.getItem('students');
The read from local storage results
[
{
"studentName":"John",
"rollno":"12",
"address1":"add1",
"address2":"add2",
"city":"Jackson Height",
"state":"New York",
"zip":"0111"
},
{
"studentName":"Mohan",
"rollno":"13",
"address1":"add3",
"address2":"add5",
"city":"Mackson Height",
"state":"New york",
"zip":"004"
}
]
I am using backbone and underscore. I want to generate html as follows with underscore template from above student json data from local storage and hook it to some
<ul>
<li ><strong>Appointments</strong></li>
//I want to create list from here from student data from localstorage
<li>student name 1 rollno</li>
<li>student name 2</li>
</ul>
How can I do this? Also, i wanted each list to be some model or something so that when i click on it, it allows me to go some view that will display all fields in students.Do in need to create model or collection though i take data from local-storage?