Omnis REST to return an Array of Objects

Dean Leggo dleggo at logicaldevelopments.com.au
Wed Mar 9 05:47:39 UTC 2022


Hi everyone

I am using Omnis as a RESTful server and I am trying to return an Array 
of Objects from Omnis, but it only returns an Array of Arrays. Is this 
possible?

Using the SwaggerDemo library 
(https://www.omnis.net/developers/resources/technotes/tnws0003.jsp) and 
the Swagger web app, it says it expects

|{ "Data_List": [ { "phone_id": "string", "phone_name": "string", 
"phone_dept": "string", "phone_ext": "string"} ] }|

But the data returned is

|{ "Data_List": [ [ "1", "Jim Douglas", "Engineering", "221"], [ "2", 
"Alfie Brown", "QA", "222"], [ "3", "Carol Smith", "QA", "223"] ] }|

How can I tell Omnis to make each item in the array an object and not 
another array?

Regards
Dean Leggo

-- 

Logical Developments Logo <https://www.logicaldevelopments.com.au> 	Dean 
Leggo
Logical Developments
Customised Software Solutions
Ph: 08 9458 3889
		We Don't Do Simple Pty Ltd
trading as
Logical Developments
ACN: 161 009 374

	Facebook logo <https://www.facebook.com/logicaldevelopmentswa/> Twitter 
logo <https://twitter.com/WeDontDoSimple> LinkedIn logo 
<https://www.linkedin.com/company/logicaldevelopments/> YouTube logo 
<https://www.youtube.com/channel/UCPldVVgWR05WX3cVrR5WUQw>


More information about the omnisdev-en mailing list