Convert String to Object in JavaScript

var str = '{"id":"st01","name":"Name 1","age":20,"address":{"street":"street 1","ward":"ward 1"}}';
var student = JSON.parse(str);
console.log('Student Info');
console.log('id: ' + student.id);
console.log('name: ' + student.name);
console.log('age: ' + student.age);
console.log('street: ' + student.address.street);
console.log('ward: ' + student.address.ward);
Student Info 
id: st01 
name: Name 1 
age: 20 
street: street 1 
ward: ward 1