× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There is a way to do that in JavaScript on the client side or are you returning the JSON to an RPG or other program?

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

On 11/7/2017 3:27 PM, Justin Taylor wrote:
With the new JSON functions, does anyone know if you can sort the results?
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/JSON%20Publishing%20Functions


Here's an example query using an IBM sample table. It seems to give the correct results, but I need to be able to sort them.

select json_arrayagg(
json_object('CustNo' :CUSNUM,
'LastName' :LSTNAM,
'Initials' :INIT,
'Street' :STREET,
'City' :CITY,
'State' :STATE,
'Zip' :ZIPCOD,
'CreditLimit' :CDTLMT,
'ChargeCode' :CHGCOD,
'Balance' :BALDUE,
'Credit' :CDTDUE)
)
from QIWS.QCUSTCDT
where BALDUE > 0


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.