Overview[1]#

JSON Object is a data structure within JavaScript Object Notation (JSON)

JSON Object Syntax#

Example:
{ "name":"John", "age":30, "car":null }

JSON Object are surrounded by curly braces {}.

JSON Object are written in key/value pairs.

Keys must be strings, and values must be a valid JSON data type (string, number, object, array, boolean or null).

Keys and values are separated by a colon.

Each key/value pair is separated by a comma.

Accessing JSON Object Values You can access the object values by using dot (.) notation:

myObj = { "name":"John", "age":30, "car":null };
x = myObj.name;

Nested JSON Object#

Values in a JSON Object can be another JSON Object.

Example:

myObj = {
  "name":"John",
  "age":30,
  "cars": {
      "car1":"Ford",
      "car2":"BMW",
      "car3":"Fiat"
  }
}

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-3) was last changed on 11-Jul-2017 09:50 by jim