Read trivia questions from local txt file

hello everyone....i'm stuck at this part
have no idea how to read a text file with the below format :

    "results": [
            "category": "Entertainment: Television",
            "type": "boolean",
            "difficulty": "medium",
            "question": "AMC's "The Walking Dead", Rick, Carl, Daryl, Morgan, Carol and Maggie were introduced to us in Season 1.",
            "correct_answer": "False",
            "incorrect_answers": [
            "category": "Entertainment: Film",
            "type": "multiple",
            "difficulty": "easy",
            "question": "Who directed "E.T. the Extra-Terrestrial" (1982)?",
            "correct_answer": "Steven Spielberg",
            "incorrect_answers": [
                "Stanley Kubrick",
                "James Cameron",
                "Tim Burton"

this is a local txt file format for trivia questions and i'm having a trouble reading this file.... don't know from where or how to start
kindly anyone sort this query out !!!!
will be highly thankful.


  1. Use the file component to read in the text file contents
  2. Use the dictionary blocks to work with the data
  3. Ensure the contents of the text file is a dictionary (use Web component blocks to decode if required)


they are from online trivia database accessed by web...... but i want to load the ques from a local text file in my pc.

You could upload the text file from your PC to the Media Folder in the Designer, then load //filename.txt at run time using the File component.

is that the correct way ?

No, you have to read the file earlier, in Screen1.Initialize

The GotText event runs way longer after that, in micro time.

Also, you have to copy the text into a global variable where you can get to work parsing it and tracing the inputs using the Companion's Do It facility.