robinhodemorais Posted April 17, 2021 Share Posted April 17, 2021 I am doing some external communications with unigui through socket.io, through the external api of socket.io is sending information in json format and when I retrieve it through ajaxevent it returns me as [object Object], how can I convert to json and read in unigui ? when I start the application I create the connection to socket.io that way on the console I retrieve the json this is my return from ajaxevent, see that on return i get [object object], how do i get that [object object] that is my json and read it? Quote Ajax=1 IsEvent=1 Obj=O9EB Evt=pushWhats return=[object Object] _S_ID=lK3d6bJKt910810F6F3 _seq_=17 Link to comment Share on other sites More sharing options...
Marlon Nardi Posted April 17, 2021 Share Posted April 17, 2021 @robinhodemorais tente converter seu objeto para ["return=" + JSON.stringify(msg)] Link to comment Share on other sites More sharing options...
robinhodemorais Posted April 17, 2021 Author Share Posted April 17, 2021 17 minutes ago, Marlon Nardi said: @robinhodemorais tente converter seu objeto para ["return=" + JSON.stringify(msg)] Perfeito @Marlon Nardi, funcionou corretamente. Quote ajaxRequest('+FormRegion.JSName+', "pushWhats",msg) Fazendo assim também, ele criou para cada campo do json um parâmetro, mas prefiro pegar em json e depois tratar no delphi, obrigado Link to comment Share on other sites More sharing options...
Marlon Nardi Posted April 17, 2021 Share Posted April 17, 2021 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now