我有一个问题我解释什么,我必须做我有转换其在下面给出JSON格式:转换JSON数据数组
[
{
"Latitude": "-7.00786",
"Longitude": "34.99805",
"UserID": 0,
"HTMLCode": "<p><h3>Jhony Jhony</h3><br/><i>t would be title, info on the missionary and then links for any social links they have. So in backend if they DO NOT have a twitter account then that icon would disappear. It only shows the icons if it exists and they put in the info in the administrator backend.\r\nFor “Get Their Updates”. It will ask for their email address and then email them a predetermined .pdf (which is set in admnistrator backend for that missionary). Als</i><br/><i>Tanzania</i><br/><img src=/Content/SocialMediaImages/_facebook_btrix.png/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>"
},
{
"Latitude": "46.91814",
"Longitude": "25.62973",
"UserID": 0,
"HTMLCode": "<p><h3>Testing</h3><br/><i>Its a testing purposes only......</i><br/><i>Romania</i><br/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>"
},
{
"Latitude": "29.54032",
"Longitude": "83.51368",
"UserID": 0,
"HTMLCode": "<p><h3>Nayeem Mansoori</h3><br/><i>Description for testing</i><br/><i>China</i><br/><img src=/Content/SocialMediaImages/_facebook_btrix.png/><img src=/Content/SocialMediaImages/_googleplus_btrix.png/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>"
}
]
而且我想这个格式更改为阵,如:
var locations = [[-7.00786, 34.99805, 0, '<p><h3>Jhony Jhony</h3><br/><i>t would be title, info on the missionary and then links for any social links they have. So in backend if they DO NOT have a twitter account then that icon would disappear. It only shows the icons if it exists and they put in the info in the administrator backend.For “Get Their Updates”. It will ask for their email address and then email them a predetermined .pdf (which is set in admnistrator backend for that missionary). Als</i><br/><i>Tanzania</i><br/><img src=/Content/SocialMediaImages/_facebook_btrix.png/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>'], [46.91814, 25.62973, 0, '<p><h3>Testing</h3><br/><i>Its a testing purposes only......</i><br/><i>Romania</i><br/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>'], [29.54032, 83.51368, 0, '<p><h3>Nayeem Mansoori</h3><br/><i>Description for testing</i><br/><i>China</i><br/><img src=/Content/SocialMediaImages/_facebook_btrix.png/><img src=/Content/SocialMediaImages/_googleplus_btrix.png/><div id=div0 style=display:none><input type=text id=txt0 /><input type=button value=Submit class=btnGetUpdatesUsingEmail data-attr-id=#txt0 data-attr-UserId=0 /> </div><a href=0 class=GetUpdates>GetUpdates</a><p>']];
请帮助我,我是谷歌搜索过但不是任何结果..
你确实有JSON,或者你有一个JavaScript数组? –
我有一个JSON数据,但我想改变为像[[-7.00786,34.99805,0,'nayeem']] –
阵列格式]你可以简要解释为什么?您现在拥有的对象语法可能更方便,也更易于理解。 – Blazemonger