Hello Terry,
Please use for..in statement for that: https://developer.mozilla.org/en/docs...
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hello Terry,
Please use for..in statement for that: https://developer.mozilla.org/en/docs...
Thanks, Sergiy,
I have it working now here is the solution to my issue of checking completeness of a trader profile:
//this indicates how complete a profile is:
//There are 20 profile items, so for every completed item
//we add 5%. This is than saved in the list item counter value
var profileCompleteness = 0, key;
for (key in Apperyio.storage.trader.get()) {
console.log("key = ", key);
if (Apperyio.storage.trader.get("$['" + key + "']") !== "") {
profileCompleteness += 5;
}
}
$("span.ui-li-count").text(profileCompleteness.toString() + "%");
Thank you for update! Glad it works now!