Answers for "import json javascript"

0

import json javascript

// example.json
{
    "name": "testing"
}


// ES6/ES2015
// app.js
import * as data from './example.json';
const {name} = data;
console.log(name); // output 'testing'
Posted by: Guest on July-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language