Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Attempt to access Array by property name

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!

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

Attempt to access Array by property name

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?

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Attempt to access Array by property name

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

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

Attempt to access Array by property name

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

Return to “Issues”