title: Setting and getting object to local storage using stringify?
body: <p>Creating an object called car:</p>
  
  <pre><code>function car(temp){
  
      this.brand=temp[0];
      this.color=temp[1];
      this.year=temp[2];
  }
  
  var temp = ['Skoda', 'Red', '2012'];
  car = new car(temp);
  </code></pre>
  
  <ol>
  <li><p>Setting object and stringify after reading from localStorage:</p>
  
  <pre><code>localStorage.setItem('car',car);
  car = localStorage.getItem('car');
  car = JSON.stringify(car);
  </code></pre>
  
  <p>car after stringify-----------------> [object Object] at file:///android_asset/www/...</p></li>
  <li><p>Stringify object and Setting object to localStorage after it:
  <code>localStorage.setItem('car',JSON.stringify(car));
  car = localStorage.getItem('car');</code> </p></li>
  </ol>
  
  <p>car after stringify-----------------> "{\"brand\":\"Skoda\",\"color\":\"Red\",\"year\":\"2012\"}" at file:///android_asset/www/...</p>
  
  <p>Question 1: Why does it make difference what is the order when you stringify the object?</p>
  
  <p>Question 2: Why can't I use stringified object like that:</p>
  
  <pre><code>08-21 11:49:14.860: I/Web Console(9642): car after stringify-----------------&gt;     {"brand":"Skoda","color":"Red","year":"2012"}
  </code></pre>
  
  <p>console.log("car.brand----->" +car.brand);
  car.name----->undefined</p>