A short JavaScript function to transform an Array or Object into a CSV