Struktur konfigurasi objek lokal katalog game jkt88.
{ } catalog-config.js{ } catalog-config.json
Salin kode
JavaScript
const localCatalogConfig = {
platform: "jkt88" ,
country: "id" ,
supportedGames: [
{ id: "045" , name: "Leprechaun Riches" , category: "Slot" },
{ id: "169" , name: "Fortune Snake" , category: "Slot" },
{ id: "100" , name: "Sprmkt Spree" , category: "Slot" },
{ id: "126" , name: "Diner Delights" , category: "Slot" },
{ id: "157" , name: "Chicky Run" , category: "Arcade" }
],
filterByCategory: function (category) {
return this.supportedGames.filter(g => g.category === category);
}
};
console.log(localCatalogConfig.filterByCategory("Slot" )); JSON
{
"platform" : "jkt88" ,
"country" : "id" ,
"supportedGames" : [
{ "id" : "045" , "name" : "Leprechaun Riches" , "category" : "Slot" },
{ "id" : "169" , "name" : "Fortune Snake" , "category" : "Slot" },
{ "id" : "100" , "name" : "Sprmkt Spree" , "category" : "Slot" },
{ "id" : "126" , "name" : "Diner Delights" , "category" : "Slot" },
{ "id" : "157" , "name" : "Chicky Run" , "category" : "Arcade" }
]
}