Simulasi struktur data lokal untuk navigasi daftar judul game st88.
{ } gameCatalog.js{ } gameCatalog.json
Salin kode
JavaScript
// Contoh struktur konfigurasi lokal untuk katalog game st88
const st88Catalog = {
brand: 'st88' ,
domain: 'st88games.com' ,
locale: 'id' ,
games: [
{ id: '009' , name: 'Win Win Won' , category: 'Permainan Slot' },
{ id: '113' , name: 'Btrfly Blossom' , category: 'Permainan Slot' },
{ id: '033' , name: 'Ganesha Gold' , category: 'Permainan Slot' },
{ id: '122' , name: 'Wild Bounty Sd' , category: 'Permainan Slot' },
{ id: '134' , name: 'Myst Spirits' , category: 'Permainan Slot' }
]
};
function filterGamesByCategory(catalog, categoryName) {
return catalog.games.filter(game => game.category === categoryName);
}
// Eksekusi filter secara lokal
const slotGames = filterGamesByCategory(st88Catalog, 'Permainan Slot' );JSON
{
"brand" : "st88" ,
"domain" : "st88games.com" ,
"locale" : "id" ,
"games" : [
{
"id" : "009" ,
"name" : "Win Win Won" ,
"category" : "Permainan Slot"
},
{
"id" : "113" ,
"name" : "Btrfly Blossom" ,
"category" : "Permainan Slot"
},
{
"id" : "033" ,
"name" : "Ganesha Gold" ,
"category" : "Permainan Slot"
},
{
"id" : "122" ,
"name" : "Wild Bounty Sd" ,
"category" : "Permainan Slot"
},
{
"id" : "134" ,
"name" : "Myst Spirits" ,
"category" : "Permainan Slot"
}
]
}