i m trying to read the json file but im getting an error saying “Cannot read property ‘get’ of undefined”
this is the code:
var GetCountryName = pc.createScript('getCountryName');
// initialize code called once per entity
GetCountryName.prototype.initialize = function()
{
pc.https.get("https://restcountries.eu/rest/v2/all",function(err,data)
{
console.log(data);
});
};
// update code called every frame
GetCountryName.prototype.update = function(dt)
{
};