update toJSONArray2

replace apply with lapply to avoid converting numeric values to
character
add hPlot pie chart example