{
"name": "NF",
"genre": "Drama",
"releaseYear": 2021
}
// Assuming you are working in a Node.js environment
const fs = require('fs');
// Read the JSON file
fs.readFile('data.json', 'utf8', (err, data) => {
if (err) {
console.error(err);
return;
}
// Parse the JSON data
const jsonData = JSON.parse(data);
// Access the JSON properties
console.log(jsonData.name); // Output: NF
console.log(jsonData.genre); // Output: Drama
console.log(jsonData.releaseYear); // Output: 2021
});