在asp.net中遍历从webmethod作为arraylist返回的JSON字符串

时间:2019-05-28 12:15:14

标签: jquery ajax

我有一个web方法可以在jQuery中返回属性详细信息的数组列表,其返回结果如下

我试图遍历数据,但由于错误是循环中未定义的长度,因此所有方法都被归档了,

{
   "d":[
      {
         "__type":"_Default+Properties",
         "propertyid":"18",
         "state":"TamilNadu",
         "district":"RAMANATHAPURAM",
         "taluk":"KADALADI",
         "villages":"ORIVAYAL",
         "latitude":"9.240044",
         "Longitude":"78.520514"
      },
      {
         "__type":"_Default+Properties",
         "propertyid":"47",
         "state":"TamilNadu",
         "district":"RAMANATHAPURAM ",
         "taluk":"KADALADI ",
         "villages":"A.USILANKULAM",
         "latitude":"9.210131",
         "Longitude":"78.499295"
      },
      {
         "__type":"_Default+Properties",
         "propertyid":"33",
         "state":"TamilNadu",
         "district":"RAMANATHAPURAM ",
         "taluk":"KADALAI",
         "villages":"AAPANOOR",
         "latitude":"9.20585",
         "Longitude":"78.500198"
      },
      {
         "__type":"_Default+Properties",
         "propertyid":"32",
         "state":"TamilNadu",
         "district":"VIRUDUNAGAR ",
         "taluk":"RAJAPALAYAM",
         "villages":"AYAN REDDIAPATTI",
         "latitude":"9.401005",
         "Longitude":"77.613261"
      }
   ]
}

这是JSON结果。

请帮助我循环遍历JSON结果。谢谢。 问候, 马丁

0 个答案:

没有答案