myArray should be an array of objects (name/content pairs) -- [{name: "name", content: "content"}]

if you iterate over such an array, you can use jQuery.each and avoid having to use the i = i+1 in the for loop below.