Page 1 of 1

Attempt to access Array by property name

Posted: Fri Jul 01, 2016 10:00 am
by Anim

Hi,

I have created an Object Under model storage.
"Content_Refresh_Array". Within this Object I have created Array string.

Image

Within the Model Storage, I have created another model "Content_Refresh_List" of type Array "Content_Refresh_Array".

Image

In Storage, I have create "Content_Refresh_Array" of type "Content_Refresh_List"

Image

Below is my GET service response mapped to the created storage.
Image

I want to get the value stored in "Data_Refresh_String" array. Its throwing me Error "Attempt to access Array by property name : 'Data_String_Refresh'"

Below is my code:

code

var refreshObj = Apperyio.storage.Content_Refresh_Array.get("$['Data_String_Refresh']");
console.log(refreshObj.length);

/code

I doubt on my way get value from storage is not correct. Any Help!


Attempt to access Array by property name

Posted: Fri Jul 01, 2016 5:56 pm
by Serhii Kulibaba

Hello,

Please clarify, what value do you want to get? Is it a length of arrays of arrays?
Could you show that value on real data you have?


Attempt to access Array by property name

Posted: Sun Jul 03, 2016 1:12 pm
by Anim

Hi Sergiy,

Thanks for your reply, I was to read the value of the array stored in a collection in array format.

Values in Collection column [0,1,1] I want to read this in model storage.

Regards
Animesh


Attempt to access Array by property name

Posted: Mon Jul 04, 2016 9:22 am
by Serhii Kulibaba

Please send us sample data of the "Content_Refresh_Array" variable. What parameter of that variable has value = [0,1,1] ?