Omnis REST to return an Array of Objects
Kelly Burgess
kellyb at montana.com
Wed Mar 9 06:29:10 UTC 2022
Hi Dean,
>..it expects
>
>|{ "Data_List": [ { "phone_id": "string", "phone_name": "string", "phone_dept": "string", "phone_ext": "string"} ] }|
Try this...
Do myRow.$define(phone_id,phone_name, phone_dept, phone_ext)
Calculate myRow.phone_id as phoneID
Calculate myRow.phone_name as phoneName
Calculate myRow.phone_dept as phoneDept
Calculate myRow.phone_ext as phoneExt
#
Do myList.$define(myRow)
Do myList.$add(myRow)
#
Do jsonRow.$define(dataList)
Calculate jsonRow.dataList as myList
#
Calculate binval as OJSON.$listorrowtojson(jsonRow)
Calculate result as utf8tochar(binval)
Kelly
More information about the omnisdev-en
mailing list