jquery - Is there a way to write javascript object array in one line? -


is there way write in 1 line?

  var data = {};   data["limit"] = [1, 0];    data["where"] = [0];    data["order"] = [];   data["display"] = [0]; 

something like

var data = {["limit"][1,0],["where"][0]...} 

javascript objects can written in one-liner this:

var data = {limit: [1, 0], where: [0], order: [], display: [0]}; 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -