{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://jsonlogic.com/schemas/common/var.json",

  "title": "Var",
  "description": "Retrieve data from the provided data object.",

  "oneOf": [
    {
      "type": "array",
      "items": [
        {
          "oneOf": [
            { "$ref": "http://jsonlogic.com/schemas/common/pointer.json" },
            { "$ref": "http://jsonlogic.com/schemas/operators/logic/if.json" }
          ]
        },
        {
          "$ref": "http://jsonlogic.com/schemas/common/all-types.json",
          "title": "Default",
          "description": "You can supply a default, as the second argument, for values that might be missing in the data object."
        }
      ]
    },
    { "$ref": "http://jsonlogic.com/schemas/operators/array/map.json" },
    { "$ref": "http://jsonlogic.com/schemas/operators/array/merge.json" },
    { "$ref": "http://jsonlogic.com/schemas/operators/array/filter.json" },
    { "$ref": "http://jsonlogic.com/schemas/operators/array/reduce.json" },
    {
      "$ref": "http://jsonlogic.com/schemas/common/pointer.json",
      "title": "Shortcut",
      "description": "If you like, we support syntactic sugar to skip the array around single arguments."
    },
    {
      "type": "string",
      "const": "",
      "title": "Entire data object",
      "description": "You can also use var with an empty string to get the entire data object – which is really useful in map, filter, and reduce rules."
    },
    {
      "type": "null",
      "title": "Null",
      "description": "Unknown null."
    }
  ]
}
