Page 1 of 1

Coding in the desert on an array with no name, It would feel good to come out of the rain.

Posted: Sat Oct 13, 2012 12:51 pm
by CraigInDallas

Note sure haw to parse this into a dropdown.

My json result from a rest call for available years comes back with an array that by default wants to load as one record, rather than parse into multiple entries. Any thoughts?

The json results look like:
[2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990]

I think the problem is that the array has no labels for itself or the values.


Coding in the desert on an array with no name, It would feel good to come out of the rain.

Posted: Sat Oct 13, 2012 2:44 pm
by maxkatz

When you test your service, click Populate Response Structure button. It will automatically create the JSON response (it worked for me).


Coding in the desert on an array with no name, It would feel good to come out of the rain.

Posted: Sat Oct 13, 2012 3:15 pm
by CraigInDallas

Thats is what I did. However when I am in the data mapping tool I have nothing to point to the group level.

Image

Image

Image


Coding in the desert on an array with no name, It would feel good to come out of the rain.

Posted: Sat Oct 13, 2012 4:17 pm
by maxkatz

Add a . (period) as a sub element and them map it a component inside a grid:

Image


Coding in the desert on an array with no name, It would feel good to come out of the rain.

Posted: Sat Oct 13, 2012 4:29 pm
by CraigInDallas

a bit strange, but it worked. Thanks