To use JSON in the visuals code you need to fetch the JSON file from some web server over httpS if you use current version of tools (powerbi-visuals-tools 2.x.x).

or you can use the beta version of tools (powerbi-visuals-tools 3.x.x) and try to import JSON file:

import "Regions.json"

or of you familiar with webpack 4 you can use webpack config to consume JSON files: - there is basic sample of config to build custom visual with webpack

Related Query

More Query from same tag