How do I publish a json body to a webpage?

Hi, newbie in javascript here, I have the following code for a dynamic page without any header/footer:

$w . onReady ( function () {

let metadata = require ( ‘public/metadata.json’ );

console . log ( JSON . stringify ( metadata ));


I have created a file called metadata.json with some data. The developer console reads it without any problem, however I cannot find a way to publish it into the page. It doesn’t even show on the Preview page. I have looked around but I think I am missing something. Any help would be great, thanks!

A JSON object is just a way to transfer data in a kind of structured way, like XML, but leaner. It consists of key-value pairs, like:
“name” : Girizano

If you want to do something with it, you have to attach the value of every key to an element on your page. This is not something Velo related. Look here: JSON Introduction