Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #json #javascript
ADD COMMENT
Topic
Name
5+8 =