Trouble creating array of JSON objects <p>Well! I have to create an array of JSON objects something like:</p> <pre><code>[object, object, object...] </code></pre> <p>and for that I take all selected rows in my jtable of jquery, creating a single object with all parameters for each row and at end of record reading I add that object to a previous array, this:</p> <pre><code>var myObject = new Array(); $selectedRows.each(function () { var record = $(this).data('record'); var id = record.id; var proyecto = record.proyecto; var tarea = record.tarea; var fase = record.fase; var name = record.name; var timeStart = record.timeStart; var timeEnd = record.timeEnd; var duracion = record.duracion; var facturada = record.facturada; var activa = record.deleted; var actividad = [{id:id,proyecto:proyecto, tarea:tarea,tarea:tarea,fase:fase,name:name,timeStart:timeStart,timeEnd:timeEnd,duracion:duracion,facturada:facturada,activa:activa }]; myObject.push(actividad); }); </code></pre> <p>Chrome console sais that I created an Array that have Arrays that have each one its correlative object, something like: [Array[1], Array[1], Array[1] ... ] My objects are inside that arrays Can I convert it to:</p> <pre><code>[object, object, object...] </code></pre> <p>???</p>