Struktur berkas skrip dan format JSON untuk manajemen katalog lokal.
{ } example.js{ } example.json
Salin kode
JavaScript
// Konfigurasi objek data lokal gg999
const gg999GamesConfig = {
platform: 'gg999' ,
environment: 'production' ,
defaultCategory: 'Slot' ,
catalog: [
{ id: '024' , name: 'Prosperity Lion' , active: true },
{ id: '131' , name: 'Hawaiian Tiki' , active: true },
{ id: '194' , name: 'Mighty Mania' , active: true },
{ id: '134' , name: 'Myst Spirits' , active: true },
{ id: '102' , name: 'Buffalo Win' , active: true }
]
};
function getActiveGames() {
return gg999GamesConfig.catalog.filter(game => game.active);
} JSON
{
"platform" : "gg999" ,
"environment" : "production" ,
"defaultCategory" : "Slot" ,
"catalog" : [
{ "id" : "024" , "name" : "Prosperity Lion" , "active" : true },
{ "id" : "131" , "name" : "Hawaiian Tiki" , "active" : true },
{ "id" : "194" , "name" : "Mighty Mania" , "active" : true },
{ "id" : "134" , "name" : "Myst Spirits" , "active" : true },
{ "id" : "102" , "name" : "Buffalo Win" , "active" : true }
]
}