Note: Make sure that you minify this library and then use the .js directly from your application. For demo purposes I am referring to this .js file directly. In production applications, it is not advisable to do so.
var arrCars = new Array("Toyota", "Mercedes", "BMW");
var jsonStr = JSON.stringify(arrCars);