Jump to content

Read return from ajaxevent in [object Object] format


robinhodemorais

Recommended Posts

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

image.thumb.png.2fe82ae52f12abb16ae55c37e3f00be0.png

on the console I retrieve the json

image.thumb.png.84ecae4cabdb1ff0bb2dd337c76cd8be.png

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

  • robinhodemorais changed the title to Read return from ajaxevent in [object Object] format
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...