title: Store data into a javascript variable
body: <p>I'm trying to store data into a javascript variable.</p>
  
  <p>Here is my scenario :
  I have a list of people (person_id, person_name), and each person is succeptible to have pets (pet_id, pet_name) and/or toys (toys_id).</p>
  
  <pre><code>[Persons]
     Person_Id
     Person_Name
     [Pets]
        Pet_Id
        Pet_Name
     [Toys]
        Toy_Id
  </code></pre>
  
  <p>I tried various things and even if sometimes I can get everything stored I'm unsure i'm doing it the right way.</p>
  
  <p>Should i store the IDs as keys ? Is like this correctly done ?
  Knowing later i will try to know how many pets and toys each person have. Also, my variable is supposed to store 1 or many persons.</p>
  
  <pre><code> var myVar = {person_id:{
                  person_name:'',
                  pet_id:{
                      pet_name:''
                  },
                  toys:{
                      toys_id:''
                  }
              }};
  </code></pre>
  
  <p>Some help would be much appreciated.</p>