getStorageItem
Description
Get the value of data saved in local storage based on key
and appId
attributes
Parameters
Param | Data type | Required | Description |
---|---|---|---|
appId | number | Yes | ID of the mini app, registered via Merchant Portal |
key | string | Yes | Key is used to get the data value stored in storage |
Return Value
Param | Data type | Description |
---|---|---|
value | string | Data value corresponding to key attribute |
Error Code
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.Storage
.getStorageItem({ appId: -9999, key: 'datacodeId' })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{
data: {
value: "DC10"
},
status: "success"
}