JavaScript
// Konfigurasi objek lokal katalog game x18
const x18GameCatalog = [
{
id: '106',
name: 'Emoji Riches',
category: 'Game Slot',
supportedPlatforms: ['android', 'web'],
activeState: true
},
{
id: '080',
name: 'Jack Frosts',
category: 'Game Slot',
supportedPlatforms: ['android', 'web'],
activeState: true
},
{
id: '116',
name: 'Battleground',
category: 'Game Slot',
supportedPlatforms: ['android', 'web'],
activeState: true
}
];
// Fungsi pembantu untuk memfilter judul aktif
function getActiveGames(catalog) {
return catalog.filter(game => game.activeState === true);
}
console.log('Total game terdaftar:', getActiveGames(x18GameCatalog).length);
JSON
{
"platform": "x18",
"country": "id",
"domain": "x18game.win",
"catalog": [
{
"id": "106",
"name": "Emoji Riches",
"category": "Game Slot",
"platforms": ["android"]
},
{
"id": "080",
"name": "Jack Frosts",
"category": "Game Slot",
"platforms": ["android"]
},
{
"id": "116",
"name": "Battleground",
"category": "Game Slot",
"platforms": ["android"]
}
]
}