I have a json file as shown in the figure.How can i randomly select one from these and extract Question and option from each
First parse the JSON object.
Now you will get a JSON array so you can randomly select a value from it using
pick random item from list block.
If you have time can you share where i want to upload by json file and some description on code
First tell me that from where are you getting JSON?
By seeing his first post I think so he is making his own code/format like Json and then use it in his App.
Btw good Idea.
First You Need A Hosting Site I Suggest AwardSpace Then Create SubDomain Or Buy Domain Then Create A MYSQL Database And Convert Data Into JSON By Using PHP And Get Data Using Web Component And Phrase It Using JSON Toll Get Your Selected Data
If the json is not so large this can help you. No need of any server.
You can download the json file on the device ahe use it and whenever you want to update just download the new file and delete the previous one.
You can use a systen like auto update.
Store the file in firebase and each time you updated the file just use some type of code to determine that the file has been updated.
I liked your Idea so much and want to try it but unfortunately I does not have my pc other wise. I hade definitely try to do it
Trying to make a quiz app?
If you are using php to covert mysql data to json, then set php query as below.
SELECT * FROM table ORDER BY RAND() LIMIT 10;
It will return random rows from mysql. You can add them into a list and pick items whenever you want.
Yes ,I have json file in my app.I want extract data from this file.(At random).
You can use File component to get JSON from file.