I need some help, I want to display the number. I am requesting this from: http://hivemc.com/json/uniquecount
我需要一些帮助,我想显示数字。我要求:http://hivemc.com/json/uniquecount
and it displays code which looks something like this:
它显示的代码如下所示:
{"count":5858708}
I want to just display the numbers.
我想只显示数字。
Thanks, Dan
1 个解决方案
#1
You can access the object member by using the .
notation or []
.
您可以使用以下命令访问对象成员。符号或[]。
var jsonObj = {"count":5858708};
var count = jsonObj.count; // Accessing by . notation
var count = jsonObj['count']; // Accessing by array notation
#1
You can access the object member by using the .
notation or []
.
您可以使用以下命令访问对象成员。符号或[]。
var jsonObj = {"count":5858708};
var count = jsonObj.count; // Accessing by . notation
var count = jsonObj['count']; // Accessing by array notation