let data=[
{
"id":1,
"name":"Dashboard",
"status":0
},
{
"id":2,
"name":"Facility",
"status":0
}]
The above code snippet shows the original data. Next, I am storing this data using session storage as shown below---
$window.sessionStorage.setItem("userItems", JSON.stringify(data));
After that, I retrieve the data from session storage---
$window.sessionStorage.getItem("userItems")
Upon retrieval, the data is displayed correctly as follows--
[{
"id":1,
"name":"Dashboard",
"status":0
},
{
"id":2,
"name":"Facility",
"status":0
}]
However, I encounter an issue when trying to repeat and display the data.