How to format the o/p of the given code in 'Contact List' lesson no-8.Please help?


#1

var friends = {};
friends.bill = {
firstName : 'Bill',
lastName : 'Pereira',
number : 554444,
address : ['9','Park Street','Vasai','401202'],

};
friends.steve = {
    firstName : 'Steve',
    lastName : 'Fernandes',
    number : 99937473,
    address : ['202/2','Cupertino','Naigaon','401303'],
};
friends.robin = {
    firstName : 'Robin',
    lastName : 'Mathews',
    number : 9993,
    address : ['202/2','Beverly Hills','CA','401303'],
};
    var list = function(obj)
    {
       for(var prop in obj){
           console.log(prop);

           } 
        };
        var search = function(name)
        {
            for(var prop in friends){
                if(friends[prop].firstName=== name){
                    console.log(friends[prop]);
                    return friends[prop];
                    }
                }
            };

list(friends);
search("Robin");