{
  "id": "json_syntax_cheat_sheet",
  "name": "JSON Syntax",
  "description": "Data consists of key/value pairs separated by commas. A pair consists of key followed by a colon followed by values",
  "metadata": {
    "sourceName": "JSON Reference",
    "sourceUrl": "http://www.json.org/"
  },
  "aliases": [
    "javascript object notation",
    "json"
  ],
  "template_type": "terminal",
  "section_order": [
    "JSON Data",
    "JSON Value Types",
    "JSON Object",
    "JSON Array"
  ],
  "sections": {
    "JSON Object":[
      {
        "key": "var obj = \\{\n\t \"first\": \"John\",\n\t \"last\": \"Doe\",\n\t \"age\": 39,\n\t \"salary\": 9999\n\\};"
      },
      {
        "key": "obj.age",
        "val": "Returns 39"
      },
      {
        "key": "obj[\"salary\"]",
        "val": "Returns 9999"
      },
      {
        "key": "obj.something",
        "val": "Returns undefined"
      }
    ],
    "JSON Value Types": [
      {
        "val": "12.2",
        "key": "number"
      },
      {
        "val": "'abc'",
        "key": "string"
      },
      {
        "val": "true",
        "key": "boolean"
      },
      {
        "val": "['a', 0, 1, 'b']",
        "key": "array"
      },
      {
        "val": "{\n\t\"id\": 7,\n\t\"name\": \"duckduckgo\"}",
        "key": "object"
      },
      {
        "val": "null",
        "key": "null"
      }
    ],
    "JSON Data":[
      {
        "key": "Key/Value Pair",
        "val": "\"firstname\" : \"John\""
      },
      {
        "key": "Key",
        "val": "A key is always a string enclosed in quotation marks"
      },
      {
        "key": "Value",
        "val": "A value can be a string, number, boolean expression, array, or object"
      }
    ],
    "JSON Array":[
      {
        "key": "var arr = \\[\n\t\"John\",\n\t\"Doe\",\n\t99,\n\t\"male\",\n\t9999\n\\];"
      },
      {
        "key": "arr[1]",
        "val": "Returns \"Doe\""
      },
      {
        "key": "arr[3]",
        "val": "Returns \"male\""
      },
      {
        "key": "arr[5]",
        "val": "Returns undefined"
      }
    ]
  }
}
