How does js vaguely match the key? of a json object through a string

defines a message type object, corresponding to key and value.

    typeTexts: {
      "task": "",
      "item":"",
      "system": "",
      "schedule": "",
      "people": ""
    }

key, will come from the background, such as

"go_task","task_start","task_step_01","task_end","close_task",typeTexts tasktasktask
The item and system that follow

are similar. How does the front end judge the data coming from the background?

Mar.11,2021

if I understand it correctly:

  

look at your topic. I have no idea what is being transferred in the background. Is it 'go_task'' or 'typeTexts object? the key in the object is' go_task'?'.
Please organize the language, describe the questions you want to ask clearly, and don't let others guess.
it's best to list examples of the response data directly and what you want to do with the response data.

Menu