我可以从我的 C# 代码中返回这个字符串。我需要实施谷歌地图。如何将其转换为数组。
细绳
var array = [["Andover - Wyevale Garden Centre","Concession A","Andover Garden Centre","Salisbury Road","Andover","SP11 7DN","01264 710114","14.9 miles","51.1998552","-1.5111393"],
["Portsmouth - Gunwharf Quays","Unit 29","Gunwharf Quays","Portsmouth","Hampshire","PO1 3TZ","02392 819558","20.8 miles","50.7963663","-1.1065603"],
["Chichester","83 North Street","Chichester","West Sussex","PO19 1LQ","01243 380058","25.9 miles","50.837269","-0.77846"],
["Newport - Isle of Wight","117/119 High Street","Newport","Isle of Wight","PO30 1TP","01983 527485","27.1 miles","50.700399","-1.294872"],
["Guildford","20-21 North Street","Guildford","Surrey","GU1 4AF","01483 456978","29.8 miles","51.2369881","-0.5731617"]]
我不知道,但是当我这样做时,array[1][0]
它应该Portsmouth
在 chrome 控制台中返回“”,但它会以undefined
.
我怀疑数组变量被标识为字符串而不是数组。
当我这样做时,array[0][4]
我得到“A”作为输出。
请帮忙