Convert String to Object List in JavaScript

var str = '[{"id":"st01","name":"Name 1","age":20},{"id":"st02","name":"Name 2","age":21},{"id":"st03","name":"Name 3","age":22}]';
var students = JSON.parse(str);
console.log('Student List');
for (var i = 0; i < students.length; i++) {
    console.log('id: ' + students[i].id);
    console.log('name: ' + students[i].name);
    console.log('age: ' + students[i].age);
    console.log('-------------------');
}
Student List 
id: st01 
name: Name 1 
age: 20 
------------------- 
id: st02 
name: Name 2 
age: 21 
------------------- 
id: st03 
name: Name 3 
age: 22 
-------------------