Jump to content

jquery array


Destramic

Recommended Posts

hey guys im tring to add entries to an array but im doing something wrong

 

here is the code ive tried...if anyone can help please

 

var found_entries = {"users":[]};
found_entries['users'].push("test");

 

var found_entries = Array();
found_entries.push("users" : "test");

 

the result im looking for is

 

var array = {"users":[{"value1", "value2"}]};

 

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/248808-jquery-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.