小编alm*_*hty的帖子

在javascript中解析json字典以遍历键

我有以下json数据来自web服务,这只是一个序列化为json的字典,现在在客户端我需要解析这个以使用javascript或jquery迭代这个json字典的键

{
   "AboutToExpire": {
      "Display": true,
      "Message": "Several of your subscriptions are about to expire. <a id=\"lnkShowExpiringSubs\" href=\"#\">View subscriptions<\/a>"
   },
   "Expired": {
      "Display": true,
      "Message": "Your McAfee WaveSecure - Tablet Edition subscription has expired and you’ve been without protection for 384 days. <a id=\"lnkNotificationRenewNow\" href=\"http://home.mcafee.com/root/campaign.aspx?cid=96035&pk=FAB37CF4-3680-4A87-A253-77E7D48BF6D7&affid=0\">Renew now<\/a>"
   }
}
Run Code Online (Sandbox Code Playgroud)

jquery json

7
推荐指数
2
解决办法
4万
查看次数

标签 统计

jquery ×1

json ×1