My app gets API response from facebook that returns all pages that current logged in user "likes". The responses are displayed in a list.
Example response:
id123 name1
id234 name2
id345 name3
I want the user to be able to click a response from the list and save the id to a local storage variable for use later. When I try to do this, the local storage variable always stores the last item in the list regardless of which item is selected. How can i get the local storage variable to store the selected item?