I use a json file as a config file. In a react component, I do not need all parameters.
For example,
myjson.json file
{
"part1": {
"param1": 12,
"param2": "aaa"
},
"part2": {
"param1": 47,
"param2": "bbb"
}
}
In my xxx.js file, with the code import myjson from './myjson.json';
, I get the whole json file in the myjson
object.
How can I directly import only part1
of the json file?
Thanks for answer.
Try this: import { part1 } from ‘./myjson.json’
before and after finasteride – http://finasteridepls.com/ avodart vs propecia