Contoh konfigurasi JavaScript dan JSON untuk pengelolaan data katalog game rf55.
{ } gameConfig.js{ } gameConfig.json
Salin kode
JavaScript
// Konfigurasi objek lokal katalog game rf55
const rf55GameConfig = {
brand: 'rf55' ,
region: 'ID' ,
defaultGame: '113' ,
availableTitles: [
{ id: '113' , name: 'Btrfly Blossom' , category: 'Slot' },
{ id: '112' , name: 'Dest Sun Moon' , category: 'Slot' },
{ id: '071' , name: 'Circus Delight' , category: 'Slot' }
]
};
function getGameTitle(gameId) {
const item = rf55GameConfig.availableTitles.find(g => g.id === gameId);
return item ? item.name : 'Unknown' ;
} JSON
{
"brand" : "rf55" ,
"region" : "ID" ,
"defaultGame" : "113" ,
"availableTitles" : [
{
"id" : "113" ,
"name" : "Btrfly Blossom" ,
"category" : "Slot"
},
{
"id" : "112" ,
"name" : "Dest Sun Moon" ,
"category" : "Slot"
},
{
"id" : "071" ,
"name" : "Circus Delight" ,
"category" : "Slot"
}
]
}