hello, i trying use the “readAsText” for a json arquive in my “assets/date”, but it Just bake me a error [OBJECT OBJECT ] my code is this .
ngOnInit(){
this.file.readAsText(this.file.applicationDirectory +"assets/data", "formulas.json").then(data => {
let returnJson = JSON.parse(data);
this.arry = returnJson;
}).catch((error) => {
this.presentAlert(error);
});
}
Ionic-angular :3.9.2
angular/core:5.2.11
ionic-native/file:^4.12.2
Cordova-plugin-file:^6.0.1