When consuming some kind of API that returns JSON, I'm used to utilize JSON.parse() to convert JSON to object.
Best regards, Christian
JSON.parse takes a string as an argument. The string is an object on JSON, but converted to string. Thats why you need to parse it.
e.g. try out
import myObject from 'my-object.json'
Regarding APIs: It depends on the library you are using. Normally all libraries returning the data already in JSON format. What library do you use?