I am writing a code that will read data from JSON file towards reactJS file. This JSON file contain multiple pages which starts at "context" then "pageNumber". When i do not include
&& (details.context.pageNumber))
The output will then show only the data content from the latest page for example if there is 20 pages of file in the JSON file it will show the data from the 20th page.
But when i put in the source code above, It supposed to show all the pages content but it does not show content and it shows this error instead.
Here are the source code :
componentDidMount(){
let jsonData01 = data01
jsonData01.responses.map((details,index) =>{
return jsonData01 = ((details.fullTextAnnotation.text) && (details.context.pageNumber));
})
console.log(`File Content JSON:\n`+ jsonData01);
}
Here are the error Output :
Any ideas or solutions guys ?
Aucun commentaire:
Enregistrer un commentaire