In your code, we can find that your hub method getConnections that has string type return value, to get the server response, please modify the code like below, which work well on my side.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
84 Points
1323 Posts
hub method return object object
May 30, 2019 06:54 AM|erum|LINK
I have below hub method
and here is ajax calling
when below line execute
it show [object object] rather than connection id ,although string return from getconnection method but shows [object object] ,any help
All-Star
40565 Points
6233 Posts
Microsoft
Re: hub method return object object
May 31, 2019 02:04 AM|Fei Han - MSFT|LINK
Hi erum,
In your code, we can find that your hub method getConnections that has string type return value, to get the server response, please modify the code like below, which work well on my side.
Test Result:
With Regards,
Fei Han