realmadrid2121 .
Posts: 0
Joined: Mon Sep 22, 2014 1:08 am

Clearing local storage variables using the appery storageAPI

From the documention:

Example

If storageVariable = {"FirstName":"Sam","LastName":"Dean"}:
Apperyio.storage.storageVariable.get() //returns {"FirstName":"Sam","LastName":"Dean"}
Apperyio.storage.storageVariable.get("$['FirstName']") //returns "Sam"

HOW would you clear Sam only?
How would you clear the whole "storageVariable?

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

Clearing local storage variables using the appery storageAPI

Hello,

You can set FirstName = "". Or do you need to remove this parameter at all? If so, please use JS below:

var storageVariable = Apperyio.storage.storageVariable.get();
delete storageVariable["FirstName"];
Apperyio.storage.storageVariable.set(storageVariable);

Return to “Issues”