I have this JSON file :
[{
"name": "bagette",
"price": "0.200"
}, {
"name": "farine",
"price": "1"
}, {
"name": "tomato",
"price": "1.200"
}, {
"name": "chocola",
"price": "4.000"
}]
I want to get the data from json file to an array in react for example :
console.log(data[0][0]); // bagette
console.log(data[0][1]); // 0.200
console.log(data[1][0]); // farine
console.log(data[3][1]); // 4.000
I'm a beginner in React Please can someone help me to write the code ?