[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

How do I pass a multidimensional JS array to FBJS Ajax.post?

Asked by JazzcatCB1 in JavaScript, JSON

Tags: FBJS, JavaScript

I have created a mutlidimensional array in JS that looks like this:
myarray = [];
myarray[0] = [];
myarray[0]['count'] = 8;
myarray[0]['id'] = 12;
myarray[1] = [];
myarray[1]['count'] = 5;
myarray[1]['id'] = 28;
myarray[2] = [];
myarray[n]['count'] = 12;
etc.

I'm trying to pass it along as a FBJS Ajax.post query string, but this doesn't work

new Ajax.post(url, {"myarray": myarray});

It appears that I must convert myarray to a string, but I'm not sure how this is done.

Here is a link to FBJS Ajax.post:

http://wiki.developers.facebook.com/index.php/FBJS/Examples/Ajax
 
Related Solutions
Keywords: How do I pass a multidimensional JS ar…
 
Loading Advertisement...
 
[+][-]07/17/09 03:07 PM, ID: 24883433Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/09 04:08 PM, ID: 24883703Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/17/09 04:55 PM, ID: 24883902Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/09 04:58 PM, ID: 24883911Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/17/09 05:40 PM, ID: 24884103Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/17/09 05:55 PM, ID: 24884194Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/09 06:10 PM, ID: 24884296Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/18/09 05:05 AM, ID: 24885719Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/09 08:51 AM, ID: 24886399Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/19/09 11:53 AM, ID: 24890590Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/19/09 11:54 AM, ID: 24890593Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/22/09 09:49 PM, ID: 24921910Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/25/09 12:43 PM, ID: 24942924Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625