jquery - How to wrap return type of ajax call in success with function -


I have a web service and it always brings back an object from my class that I define on the server side.

success method $ Ajax function I always get this object and on the client side, I want to add some functions to show off my properties faster.

Is there any such way? (JSON object will come back, I am concerned about it)

You expand the javascript object You can add more ways to:

  var json = {name: 'john'}; Json.print = function () {Warning ('my name is' + this.name); }; Json.print ();  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -