service and dataset

Hi i've created a service on the server by this code below. See the funcion 'DoQuery' ... I want to came back to client the result records of query that i pass by parameters... Its possible ? i declared result as TJSObject but i'm not sure !!! side client how get result records ?

Thank you

IMyQueryService = interface(IInvokable)
[HttpGet] function Sum(A, B: double): double;
// By default, any service operation responds to (is invoked by) a POST request from the client.
function EchoString(Value: string): string;

TMyQueryService = class(TInterfacedObject, IMyQueryService)
function DoQuery(TipoQry,QryStr:String):TJSObject;
function EchoString(Value: string): string;


uses d_DM0, FDUnit;

function DoQuery(TipoQry,QryStr:String):TJSObject;
'SELECT Azione, Data_Ora, TDS_Reg, Info_Cli FROM SMS_Act WHERE TDS_Reg > 200');

Result := Nil;

XData is Delphi, not Web. TJSObject is an identifier of Web Core framework, not Delphi. You can't use TJSObjectin XData. You can use the regular TJSONObject available from Delphi RTL. Then it would be up to you to convert the result of the dataset to a TJSONObject value.
Depending on the database framework you are using, they provide that for you, like FireDAC: