matrix2json(mat)
library(df2json) df <- matrix(1:9, byrow = TRUE, nrow=3) matrix2json(df)
Run the code above in your browser using DataCamp Workspace