Hi,
I'm successfully using model and storage, however I am having trouble running through a storage variable for a sum.
I have a model which includes an object(OrderItem), which includes String(Item), Number(Qnt), Number(Cost).
I have another model which is the array of OrderItem - Array(OrderItemArray)
There are no issues with using and saving to the models.
However I am trying to sum the "Cost" by using the following
-----------------------------var arr = Apperyio.storage.OrderItemArray.get("$['OrderItem']['Cost']");
var sum = 0;
for(i=0; i < arr.length ; i++)
sum = sum + arr;
Appery('mobilelabel_147').text(sum);
alert(sum);
and receiving the following error
uncaught error: Attempt to access Array by property name: 'OrderItem'
Am I trying to access the model using the wrong method?