Sunday, June 5, 2022
HomeGame DevelopmentThe right way to import my JSON file knowledge into JS file...

The right way to import my JSON file knowledge into JS file – Cocos Creator


Hello guys
I’ve a priority I want to make a drop-down menu that can show the checklist of nation indicators. I’ve a JSON file with all the indications, their flags and names of every nation, I used to be in a position to make the dropdown menu and I want to show the info contained within the JSON file in my dropdown menu.

Right here is my .JSON file

Right here is my file in JS the place I create the choice in my dropdown menu

Thanks upfront please assist me


you’ll be able to seek advice from: JSON · Cocos Creator

Might you present your demo, and present the ultimate outcome you need?

In a logic that I want to make a drop-down menu to show and make a selection on the nations for the participant, right here it’s

I want to show the knowledge contained within the JSON file within the Dropdown Menu

You possibly can seek advice from doc i metioned earlier than to get JSON knowledge from JSON file , then to set knowledge to the Dropdown Menu.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments