automatically index objects in JSON array