Building dynamic array using javascript/ajax -


i want create dynamic array server data,

for example,

i need format in following way:

["project1","project2","project3"] 

this code

var arrayval = [];     for(var i=0;i<project.name;i++){       //array generation     } 

project1,project2,.... getting server.

what you're looking json.parse. here's example copied form js terminal.

> = json.parse('["project1","project2","project3"]') ["project1", "project2", "project3"] > a[0] "project1" 

now, weary, json isn't integrated browsers yet. can download json script emulate native functions. see here , here


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -