This is used to download the Json data to .csv file. The user can get the .csv file from any sources of Json format.
Smartcode
Syntax
JsonToCSVfile(modelname,filename)
Parameters
- modelname(Required) – name of the model in which contains the Json data
- filename(Required) – File name to download
Example
JsonToCSVfile(‘dmemployeedata’,’Employee List’)
Directcode
await OreApibinding.GetDataModalData(this,”<<modelcode>>”).then((response) => {
if (response == undefined || response.status == false){
this.setState({ spinner: false });
return;
}
else{
this.downloadcsv(response.data,”Employee List”);
}
})
Note : This method will be accessible only if the Export .csv file package is included in the app.