Jump to content

help with json2, unable to "jsonize" javascript array


s0c0

Recommended Posts

I have a 2 dimensional javascript array, that I want to pass over to a PHP function via Ajax.  When I use the json2.js file located here http://json.org/js.html for implementing json in javascript I don't get a jsonized array at all.  Here is my code:

 

var prodArr =  JSON.stringify(productsArr);

 

I think it is expecting that I am sending it an object.  Prior to this I had been using the json.js file instead of json2.js and it worked fine using the toJsonString method.  Not sure why they took this out of the new json, but I had to start using it since the original json conflicted with the mootools framework.  Did I mention I really hate javascript sometimes and I am tired of typing json.

 

Any help on this?

 

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.