Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Limit items in object

Thank you. I understand now. Using arr that you defined it works great. arr needs to be dynamic, however, so I tried to define by getting an object out of local storage and instead of returning an updated object, it just returns what is in the screenshot.

Image

My object in storage looks the same as yours that you hard-coded in so I'm not sure what the issue is.

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Limit items in object

Please parse the value from the local storage before using it in this code. Please use the function JSON.parse() for that

Return to “Issues”