Variables

When creating a new item or updating an existing item, you can use variables to substitute computed or generated values into your JSON data.

The following variables are available for use in your JSON data:

  • $jsonpad-var:now

    The current date and time in ISO 8601 format.

    You can optionally specify a format. Check here for reference.

    If no format is provided, the current date will be substituted using ISO 8601 format.

    $jsonpad-var:now('YYYY-MM-DD')
  • $jsonpad-var:uuid

    A randomly generated Version 4 UUID.

  • $jsonpad-var:short-uid

    A randomly generated short unique ID.

  • $jsonpad-var:list-id

    The id of the list this item is in.

  • $jsonpad-var:list-name

    The name of the list this item is in.

  • $jsonpad-var:list-path-name

    The path name of the list this item is in, or an empty string if the list doesn't have a path name.

  • $jsonpad-var:item-id

    The id of the item.

  • $jsonpad-var:item-created-at

    The date the item was created in ISO 8601 format.

  • $jsonpad-var:item-updated-at

    The date the item was last updated in ISO 8601 format.

  • $jsonpad-var:item-identity-id

    The id of the identity that owns the item, or an empty string if the item doesn't have an owner.

  • $jsonpad-var:random-number

    A random floating point number.

    You can optionally specify a minimum and maximum value, and the precision of the number.

    Defaults are: min = 0, max = 1, precision = 2.

    If the generated value is being substituted into an object field or array element and is alone within that value, then it will be inserted as a numeric value instead of a string.

    $jsonpad-var:random-number(10, 15, 1)
  • $jsonpad-var:random-integer

    A random integer.

    You can optionally specify a minimum and maximum value.

    Defaults are: min = 0, max = 10.

    If the generated value is being substituted into an object field or array element and is alone within that value, then it will be inserted as a numeric value instead of a string.

    $jsonpad-var:random-integer(1, 100)
  • $jsonpad-var:random-date

    A random date in ISO 8601 format.

    You can optionally specify a from and to date. The generated date will be in between these dates.

    If a from date is not provided, the current date minus one year will be used. If a to date is not provided, the current date will be used.

    $jsonpad-var:random-date(2024-01-15, 2030-12-31)
  • $jsonpad-var:random-string

    A randomly generated string.

    You can optionally specify a format. The format can include:

    • * (any character)
    • # (a numeric digit)
    • x (a lowercase alphabetical character)
    • X (an uppercase alphabetical character)

    All other characters except ( and ) are treated as literals and will be passed through to the output.

    If no format is provided, the default format ******** will be used.

    $jsonpad-var:random-string(####-####-xX**)
  • $jsonpad-var:random-first-name

    A randomly generated first name.

    You can optionally specify a gender. This can be male or female.

    $jsonpad-var:random-first-name(female)
  • $jsonpad-var:random-last-name

    A randomly generated last name.

  • $jsonpad-var:random-word

    A randomly chosen lorem ipsum word.

  • $jsonpad-var:random-text

    Randomly generated text made from space-separated lorem ipsum words.

    You can optionally specify the minimum and maximum length of the text, measured in words.

    If no minimum or maximum is specified, one word will be generated.

    $jsonpad-var:random-text(5, 10)
  • $jsonpad-var:random-enum

    A randomly chosen value from a comma-separated list of specified values.

    $jsonpad-var:random-enum(one, two, three, four)
  • $jsonpad-var:random-boolean

    true or false, randomly chosen.

    You can optionally specify the probability of true .

    If the generated value is being substituted into an object field or array element and is alone within that value, then it will be inserted as a boolean value instead of a string.

    $jsonpad-var:random-boolean(0.75)

Example JSON

{
now: "$jsonpad-var:now"
currentYear: "$jsonpad-var:now(YYYY)"
uuid: "$jsonpad-var:uuid"
shortUid: "$jsonpad-var:short-uid"
listId: "$jsonpad-var:list.id"
listName: "$jsonpad-var:list.name"
listPathName: "$jsonpad-var:list.path-name"
itemId: "$jsonpad-var:item.id"
itemCreatedAt: "$jsonpad-var:item.created-at"
itemUpdatedAt: "$jsonpad-var:item.updated-at"
itemIdentityId: "$jsonpad-var:item.identity-id"
randomNumber1: "$jsonpad-var:random.number"
randomNumber2: "$jsonpad-var:random.number(5, 10)"
randomNumber3: "$jsonpad-var:random.number(5, 10, 3)"
randomInteger1: "$jsonpad-var:random.integer"
randomInteger2: "$jsonpad-var:random.integer(5, 10)"
randomDate1: "$jsonpad-var:random.date"
randomDate2: "$jsonpad-var:random.date(2024-11-01, 2024-11-2)"
randomString1: "$jsonpad-var:random.string"
randomString2: "$jsonpad-var:random.string(**.##xxx-XXX)"
randomFirstName1: "$jsonpad-var:random.first-name"
randomFirstName2: "$jsonpad-var:random.first-name(male)"
randomFirstName3: "$jsonpad-var:random.first-name(female)"
randomLastName: "$jsonpad-var:random.last-name"
randomWord: "$jsonpad-var:random.word"
randomText1: "$jsonpad-var:random.text"
randomText2: "$jsonpad-var:random.text(5, 10)"
randomEnum: "$jsonpad-var:random.enum(one, two, three)"
randomBoolean1: "$jsonpad-var:random.boolean"
randomBoolean2: "$jsonpad-var:random.boolean(0.8)"
}
{
now: "2026-09-05T11:29:32.079Z"
currentYear: "2026"
uuid: "d454a6b0-5cdb-4d38-9666-f3851a43cafb"
shortUid: "a1b2c3d4"
listId: "18d31b17-e650-4fc9-b32e-26da35aa4391"
listName: "List Name"
listPathName: "list-path-name"
itemId: "d0ee1a22-8bce-46c3-8ad9-1a7e3e7cf1b3"
itemCreatedAt: "2026-09-05T11:29:32.079Z"
itemUpdatedAt: "2026-09-05T11:29:32.079Z"
itemIdentityId: "5aad99d6-5f36-460d-b789-41e699f28c9a"
randomNumber1: 0.5
randomNumber2: 7
randomNumber3: 7.123
randomInteger1: 5
randomInteger2: 7
randomDate1: "2026-09-05T11:29:32.079Z"
randomDate2: "2026-09-05T11:29:32.079Z"
randomString1: "kl12mn34"
randomString2: "a6.43jnc-ABP"
randomFirstName1: "John"
randomFirstName2: "John"
randomFirstName3: "Jane"
randomLastName: "Doe"
randomWord: "lorem"
randomText1: "lorem"
randomText2: "lorem ipsum dolor sit amet"
randomEnum: "two"
randomBoolean1: false
randomBoolean2: true
}
2024-11-26