As I mentioned in THIS QUESTION, I have problem when getting the response from the server.
I receive an array of objects with these attributes:
[{
\"
you can use replacer in JSON.stringify() like :
var obj = {
"Id": 143187001116603, // VERY big number which I want to convert it to string
"Name": "تملی612", // string
"Title": "تسهیلات مسکن بانک ملی-اسفند96", // string
"InsCode": "IRO6MELZ96C1" // string
};
function replacer(name, val) {
// convert Number to string
if ( val && val.constructor === Number ) {
return val.toString();
} else {
return val; // return as is
}
};
JSON.stringify(obj, replacer, 4);
// result
{
"Id": "143187001116603",
"Name": "تملی612",
"Title": "تسهیلات مسکن بانک ملی-اسفند96",
"InsCode": "IRO6MELZ96C1"
}