你如何在JavaScript中用JSON写一个空键?

3 javascript json key

假设您有以下JSON对象

{"":"some text"}
Run Code Online (Sandbox Code Playgroud)

你如何在JavaScript中检索它?

json_in_var={"":"some text"}  
alert(json_in_var.)
Run Code Online (Sandbox Code Playgroud)

我很困惑这个,欢迎任何帮助!

Guð*_*r H 14

引用它是一个语法错误

json_in_var.
Run Code Online (Sandbox Code Playgroud)

但是,您可以像这样访问它:

json_in_var[""]
Run Code Online (Sandbox Code Playgroud)