-1

I want to return a single json object and read the ip address

//This is the object in json file
{"ip":"http://localhost:8080"}

For example, I want

import urlAddress from './url.json';

const url = //the json value;
console.log(url);
Youngho Kim
  • 195
  • 1
  • 3
  • 8

1 Answers1

0

objects.json

export default {
  "ip":"127.0.0.1"
}

app.js

import objects from './objects'
console.log(objects.ip) // output: 127.0.0.1
ahmetbcakici
  • 363
  • 6
  • 17