localStorage.setItem(key, val) showing undefiend
<p>I am trying to set my object locally and i console.log that localstorage but i am getting undefined.</p>

<p>here is my function</p>

<pre><code>            searchBar(item) { //item is object here as parameter

             console.log(item);
        localStorage.setItem('object',JSON.stringify(item))
this.quickOrder.push(localStorage.getItem('object'));

    console.log(this.quickOrder);

                  }
</code></pre>

<p>i have a quickOrder Array declared globaly.</p>

<p>in my console.log(item) i am able to see my object.</p>

<p>i am trying to push that object with local storage to my empty array so that i can make use of ngFor to display in UI.</p>

<blockquote>
  <p>my console.log(this.quciOrder); shows undefiend.</p>
</blockquote>