dimanche 9 septembre 2018

How to set all attributes of ember object to null ?

I have an ember object 'Person' . For example ,

        person = { 
                  name: "Rahul" , 
                  age: "29", 
                  companyDetails: { tel: "9809823897" , name: "Amazon"},
                  phone: "2377373893" 
        } 

How do i set all properties of this 'person' to null? I want the result to be

        person = { 
                  name: null , 
                  age: null, 
                  companyDetails: { tel: null , name: null},
                  phone: null 
        } 




Aucun commentaire:

Enregistrer un commentaire