anton6984647
Posts: 0
Joined: Mon Jul 14, 2014 3:53 pm

Mapping Server Array to List

Hello,
I'm having some difficulty mapping my server-generated array to a list that auto-expands.

Here are the two arrays I'm getting in server code testing:
{"usermessage":["message2","message3","message1","message0"],"fullname":["user2","user3","user1","user0"]}
and the relevant bit of server code:

responseBody.fullname = fn;
responseBody.usermessage = umess;
response.success(responseBody, "application/json");

Here is my response mapping:
Image

Is there another way I should be passing the parameters or assigning them?

anton6984647
Posts: 0
Joined: Mon Jul 14, 2014 3:53 pm

Mapping Server Array to List

This is what I'm getting in mobile preview. Each of these should be it's own list, instead of one big list item. Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Mapping Server Array to List

Hi Anton,

At first you probably have wrong "response" parameters in your service settings.

Please take a look on your service response tab and check whether you have "Array" check box checked for your "array-type" response fields.

See details on screen shot: http://prntscr.com/42sx01/direct

After, you will get in your mapping [] array-field where you can make following mapping:

See screen shot: http://prntscr.com/42sxog/direct

Regards.

Return to “Issues”