how to extract only one element from local storage javascript code example Example: get specific item from local storage JSON.parse(localStorage.getItem('user')).id