Saltwater USA
Posts: 0
Joined: Thu Oct 23, 2014 2:18 am

Max/Min by Dates

Hi,

Instead of showing all data from JSON array,
I want to retrieve only the max/min "v" and the "t" that is associated with the max/min "v".

t= time, v=height

How can I achieve this?

Thanks!

Image

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

Max/Min by Dates

Hi Saltwater,

You can get min or max value with separate services.

So you should use two services for this goal.

1 With parameters:

pre

sort = yourField
limit = 1

/pre

2 With parameter:

pre

sort = -yourField
limit = 1

/pre

These two request will return your min and max value.

See more about sort and limit parameters for list service here:

http://devcenter.appery.io/documentat...

Regards.

Saltwater USA
Posts: 0
Joined: Thu Oct 23, 2014 2:18 am

Max/Min by Dates

Hi Yurii,

I added "sort" parameter to my request, but it does not work.

What could be an alternative option?

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

Max/Min by Dates

Hi Saltwater,

That should work.. Show us screen shots with "Settings", "Request" and "Test"(with test response) tab.

Alternative solution - to use Server code. But it's more difficult to implement in comparison with the solution above.

Regards.

Return to “Issues”