Page 1 of 1

For REST service, how do I setup response parameters for duplicate string names in a object?

Posted: Thu Oct 23, 2014 3:59 am
by Yurii Orishchuk

Hi Saltwater,

Not sure i've understood you correctly.

Please make some screen shots and describe them to be clear.

Try this solution:

1 Add "success" JS event handler for this service.

2 Populate it with following code:

pre

var cloudcover = data.weather[0].hourly.cloudcover;

alert("cloudcover = " + cloudcover);

/pre

Also if you need to make some "mapping" by these iterated elements you should modify your response. You can do it with "generic security context". See details: http://devcenter.appery.io/documentat...

Regards.


For REST service, how do I setup response parameters for duplicate string names in a object?

Posted: Thu Oct 23, 2014 1:42 pm
by Saltwater USA

Image

Thank you for your response.

I am a beginner and please understand that I wasn't very clear.

If you see the screenshot, I can pull out

longitude = data.nearest_area.longitude

But I do not receive any response when I try to pull out strings in

data.weather.date.hourly.

How do I populate the cloudcover in first hourly {} or second {}?

Hope this makes more sense to you.

Thanks!


For REST service, how do I setup response parameters for duplicate string names in a object?

Posted: Thu Oct 23, 2014 1:49 pm
by Saltwater USA

Oh... I see it now!!! I think you got me correctly!!
Many thanks!!!


For REST service, how do I setup response parameters for duplicate string names in a object?

Posted: Mon Jul 20, 2020 10:08 am
by Saltwater USA

hourly"": [ { ""cloudcover"": ""10""