I have the following json object i need to alert it through javascript.

{data:[{"empmenuid":"1","empid":null,"deptid":"66","aliasid":"66","firstname":"66","lastname":"66","sin":"66","status":"66","empclass":"66","hiredate":"66","seneoritydate":"66","separationdate":"66","recalldate":"66","martialstatus":"66","gender":"66","ethinicorigin":"66","ethinicsuborigin":"66","nationality":"66","address1":"66","address2":"66","city":"66","province":"66","postalcode":"66","country":"66","email":"66","officialemail":"66","phone":"66","otherphone":"66","fax":"66","officephone":"66","officeext":"66","officefax":"66","mobilephone":"66","pager":"66","locid":"66","jobtitle":"66","jobtitlestart":"66","fullpart":"66","manager":"66","managername":"66","middlename":"66","nickname":"66","paytype":"66","payfreq":"66"},{"empmenuid":"3","empid":null,"deptid":"12","aliasid":"12","firstname":"12","lastname":"12","sin":"12","status":"12","empclass":"12","hiredate":"12","seneoritydate":"12","separationdate":"12","recalldate":"12","martialstatus":"12","gender":"12","ethinicorigin":"12","ethinicsuborigin":"12","nationality":"12","address1":"12","address2":"12","city":"121","province":"12","postalcode":"12","country":"12","email":"12","officialemail":"12","phone":"12","otherphone":"12","fax":"12","officephone":"12","officeext":"12","officefax":"12","mobilephone":"12","pager":"12","locid":"12","jobtitle":"12","jobtitlestart":"12","fullpart":"12","manager":"12","managername":"12","middlename":"12","nickname":"12","paytype":"12","payfreq":"12"}],
recordType : 'object'}

推荐答案

Just use

alert(JSON.stringify(your_json_obj));

Json相关问答推荐

Swift解码错误类型与`Bool`type不一致

如何使用JQ打印每个根级对象键一行?

Vega Lite中的图例对齐

给定一个包含两个数组的JSON输入文件,如何使用Jolt将一个数组中的每个元素与另一个数组组合在一起?

将PNG图像保存为Python中的JSON文件

Bicep脚本中如何设置弹性池的维护窗口?

将带有::text[]的JSON数组转换未按预期工作

如何在 JSonPath 中按值查找列表中的所有元素

try 使用 JQ 转换 JSON 中过于复杂的对象数组

通过 xslt 将内部 json 转换为 xml 时遇到问题

从 PySpark 中的复杂 JSON 文件中高效清除 HTML 实体

使用带有逗号的字段名称构建 struct

无法向 Json 数组添加新元素

如何从 JSON 对象中获取日期

在 JavaScript 中从 Json 数据中删除反斜杠

如何从Typescript 中的json响应中获取日期对象

验证和格式化 JSON 文件

如何在 Perl 中将简单的哈希转换为 json?

AJAX 将 JavaScript 字符串数组发布到 JsonResult 作为 List 总是返回 Null?

通过 JSON 发送 64 位值的公认方式是什么?