Convert Objects to JSON

var versions = [];
var version = {};

version.folder = 'banners';
version.width = 1000;
version.height = 600;
version.crop = 'true';
version.root = 'true';

versions.push(version);
console.log(JSON.stringify(versions));
// [{"folder":"banners","width":1000,"height":600,"crop":"true","root":"true"}]