I have the following code, which successfully outputs data to to the product_slides array.
var product_slides = new Array();
Product.findAll({}, function(products) {
$.each(products, function(i, product) {
var product_slide = new Object();
product_slide.title = product.name;
product_slide.url = product.url;
product_slides[i] = product_slide;
});
});
When I view the contents with console.log(product_slides);
in firebug's console it has the following format:
[
{image = 'value', url = 'value'},
...
]
however, I need it to have the following:
[
{image : 'value', url : 'value'},
...
]
which I believe may be JSON(?).
I'm still quite new to scripting, does anyone know how to swap those =s for :s ?