Add JSON-LD to store product pages

I edited the code but not works. There are no errors, but not edit the JSON.
I try to debug the code with 3 console.log but only the first print the value.
Why? Thank you .

This is the new code:

// API Reference: https://www.wix.com/velo/reference/api-overview/introduction
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world
import wixLocation from ‘wix-location’ ;
import wixSeo from ‘wix-seo’ ;
import wixData from ‘wix-data’ ;

$w . onReady ( async function () {
initBrand ();

wixLocation . onChange ( async ( location ) => {
initBrand ();
})
})

async function initBrand () {
let structuredData = wixSeo . structuredData ;
console . log ( structuredData ); // inspect structuredData
let singoleRecensioni =;
let mediaVoti = 0 ;
let totaleVoti = 0 ;

wixData . query ( “Recensioni” )
. eq ( “lingua” , “IT” )
. eq ( “prodotto” , “Omega 15” )
. find ()
. then ( ( results ) => {
totaleVoti = results . items . length ; console . log ( totaleVoti ); //print the correct number
let somma = 0 ;
for ( let i = 0 ; i < totaleVoti ; i ++ ){
singoleRecensioni [ i + 1 ][ “@type” ]= “Review” ;
singoleRecensioni [ i + 1 ][ “name” ]= results . items [ i ]. titolo ;
singoleRecensioni [ i + 1 ][ “reviewBody” ]= results . items [ i ]. descrizione ;
singoleRecensioni [ i + 1 ][ “reviewRating” ][ “@type” ]= “Rating” ;
singoleRecensioni [ i + 1 ][ “reviewRating” ][ “ratingValue” ]= results . items [ i ]. valutazione ;
singoleRecensioni [ i + 1 ][ “datePublished” ]= results . items [ i ]. data . getFullYear ()+ “-” + results . items [ i ]. data . getMonth ()+ “-” + results . items [ i ]. data . getDay ();
singoleRecensioni [ i + 1 ][ “author” ][ “@type” ]= “Person” ;
singoleRecensioni [ i + 1 ][ “author” ][ “name” ]= results . items [ i ]. autore ;
singoleRecensioni [ i + 1 ][ “publisher” ][ “@type” ]= “Organization” ;
singoleRecensioni [ i + 1 ][ “publisher” ][ “name” ]= “Omega Stations” ;
somma += results . items [ i ]. valutazione ; console . log ( i ); //print anyting
}
mediaVoti = somma / totaleVoti ;
console . log ( singoleRecensioni );
singoleRecensioni [ 0 ][ “aggregateRating” ][ “@type” ]= “AggregateRating” ;
singoleRecensioni [ 0 ][ “aggregateRating” ][ “bestRating” ]= 5 ;
singoleRecensioni [ 0 ][ “aggregateRating” ][ “worstRating” ]= 1 ;
singoleRecensioni [ 0 ][ “aggregateRating” ][ “ratingCount” ]= totaleVoti ;
singoleRecensioni [ 0 ][ “aggregateRating” ][ “ratingValue” ]= mediaVoti ; console . log ( singoleRecensioni );
structuredData [ 0 ] += singoleRecensioni ;
console . log ( structuredData ); // inspect structuredData //print anyting
wixSeo . setStructuredData ( structuredData );
} )
. catch ( ( err ) => {
let errorMsg = err ;
} );

}