Forum Discussion
Export data in JSON format
- 9 years ago
In Power BI Desktop, you can use the R script to convert the data frame into JSON format and export into a JSON file.
1. Configure your R environment. Install readr and jsonlite packages.
2. Drag the fields you want to export into a R visual. Write R script below and Run:
library(readr) library(jsonlite) x<-toJSON(dataset) cat(x) write_lines(x,path = "/Program Files/R/R-3.3.3/write_json.json") plot(dataset)
Ps: The file need to be created first with permission granted to packages.
You can see the generated JSON format data in R studio.
Regards,
In Power BI Desktop, you can use the R script to convert the data frame into JSON format and export into a JSON file.
1. Configure your R environment. Install readr and jsonlite packages.
2. Drag the fields you want to export into a R visual. Write R script below and Run:
library(readr) library(jsonlite) x<-toJSON(dataset) cat(x) write_lines(x,path = "/Program Files/R/R-3.3.3/write_json.json") plot(dataset)
Ps: The file need to be created first with permission granted to packages.
You can see the generated JSON format data in R studio.
Regards,