ScriptTap
JSON

Command video guide

JSON

JSON lets later script steps work with structured data: extract a typed value, check whether a path exists, measure length, or return formatted JSON text. This introduction builds the shortest useful example: SetVariable prepares the JSON String, JSON extracts one property, and PromptMe displays its result.

Create and rename a new Blank script. Manually drag all three commands into the live script in this order: SetVariable → JSON → PromptMe. Do not edit an existing script.

In SetVariable, keep Single and This Script Only, select String, name it s1, and enter this exact example:

{"status":"Ready","count":2,"price":1.5,"enabled":true,"tags":["Demo","Guide"]}
  • Mode: Extract returns a typed value; Exists checks whether a path is present; Length counts array items, object keys or String characters; Stringify returns valid Compact or Pretty JSON text. This guide keeps Extract.
  • JSON String: s1 names a prior String variable containing JSON. The JSON command does not accept a literal document, file, network response, clipboard or screenshot directly; use an earlier command to prepare the String.
  • Scope: keep This Script Only. Script Thread is available when outputs must be visible to called scripts within the same run.
  • Path Source: Text for a fixed path, or String var for a path prepared by an earlier command. The video shows the variable field first, then returns to Text and enters $.status.
  • Path grammar: $ selects the root; $.status selects the case-sensitive status property; $.tags[0] selects the first tag. Nested dot names and double-quoted bracket keys such as $["key with spaces"] are supported. JSON array indexes start at zero. Wildcards, filters, recursive descent, expressions, slices and negative indexes are unsupported.
  • Output Type: keep String and enter s2. String returns text without JSON quotation marks; a JSON null becomes an empty String. A non-String value fails this output type. Other supported outputs are Integer, Decimal, Boolean, String Array and JSON Text.
  • Optional outputs: independently enable Success Boolean b1 and Error String s3 under Save Outputs. Bad JSON, invalid or missing paths, and type mismatches fail safely. Success leaves Error empty. Keep these separate from the extracted value.
  • Test: previews the current configuration using available values without saving it. This example reports Success and Count 1. If required runtime values are unavailable, the editor explains that limitation. Always play the full script to verify the complete flow.

Save JSON, then configure Standard PromptMe with Header s2 and a Done button using Boolean b2. Play displays the actual extracted Ready text. Done closes the confirmation and the script finishes automatically.

True operation changes clear fields owned only by the operation being left. Ordinary output-enable gates preserve their child destinations. Select the intended operation before filling its settings. Text outputs are capped at the normal String limit; an optional Error output can report truncation even when the operation succeeds. Input JSON is not changed. JSON's own Run Log entries do not include the full input text; an earlier source command may log its own supplied value.

Intro & Extract String

Step-by-step guide

  1. Step 01

    The JSON command lets a script work with structured data instead of cutting values out of a long text string. It can extract a value, check whether a value exists, measure its length, or format it as JSON text. We'll extract a status and display the result.

    JSON step 1: The JSON command lets a script work with structured data instead of cutting values out of a long text string. It can extract a value, check whether a value exists, measure its length, or format it as JSON text. We'll extract a status and display the result.
  2. Step 02

    Open Scripts from the main overlay menu. Create a new Blank script for this example.

    JSON step 2: Open Scripts from the main overlay menu. Create a new Blank script for this example.
  3. Step 03

    Rename the new script, then select it. We'll keep this example separate from the scripts you already have.

    JSON step 3: Rename the new script, then select it. We'll keep this example separate from the scripts you already have.
  4. Step 04

    Open the script editor. We'll build three commands: prepare our example data, extract one value, and show that value with PromptMe.

    JSON step 4: Open the script editor. We'll build three commands: prepare our example data, extract one value, and show that value with PromptMe.
  5. Step 05

    Under Variables, drag SetVariable into the live script. This supporting command gives JSON some text to read.

    JSON step 5: Under Variables, drag SetVariable into the live script. This supporting command gives JSON some text to read.
  6. Step 06

    Keep Single, choose String, and name the variable s1. Keep This Script Only for this example.

    JSON step 6: Keep Single, choose String, and name the variable s1. Keep This Script Only for this example.
  7. Step 07

    Enter this small JSON object as the String value. JSON stores named values and lists using quotes, braces, and brackets. The complete example is also written below the video.

    JSON step 7: Enter this small JSON object as the String value. JSON stores named values and lists using quotes, braces, and brackets. The complete example is also written below the video.
  8. Step 08

    Our object contains the status Ready, a count, a price, an enabled flag, and a list of tags. We'll use status now. The other values let the following guides reuse the same example.

    JSON step 8: Our object contains the status Ready, a count, a price, an enabled flag, and a list of tags. We'll use status now. The other values let the following guides reuse the same example.
  9. Step 09

    Tap OK to save SetVariable. It will prepare s1 when the script plays.

    JSON step 9: Tap OK to save SetVariable. It will prepare s1 when the script plays.
  10. Step 10

    Now drag JSON after SetVariable and open it. JSON must come after the command that supplies its input.

    JSON step 10: Now drag JSON after SetVariable and open it. JSON must come after the command that supplies its input.
  11. Step 11

    Mode selects the operation. Extract returns a value. Exists checks whether a path is present. Length counts items, object keys, or text characters. Stringify returns formatted JSON text. Keep Extract for this guide.

    JSON step 11: Mode selects the operation. Extract returns a value. Exists checks whether a path is present. Length counts items, object keys, or text characters. Stringify returns formatted JSON text. Keep Extract for this guide.
  12. Step 12

    Keep This Script Only and set JSON String to s1. This field names the earlier String variable; it is not where you paste JSON data or choose a file.

    JSON step 12: Keep This Script Only and set JSON String to s1. This field names the earlier String variable; it is not where you paste JSON data or choose a file.
  13. Step 13

    Path Source can use a String variable when an earlier command decides which value to select. We'll use Text instead, so we can enter a fixed path directly.

    JSON step 13: Path Source can use a String variable when an earlier command decides which value to select. We'll use Text instead, so we can enter a fixed path directly.
  14. Step 14

    Enter dollar sign, dot, status. The dollar sign means the root of the JSON data, and dot status selects its status property. Property names are case-sensitive.

    JSON step 14: Enter dollar sign, dot, status. The dollar sign means the root of the JSON data, and dot status selects its status property. Property names are case-sensitive.
  15. Step 15

    Paths can also use nested names or array indexes. JSON array indexes start at zero. Use the path examples below the video for keys with spaces. Wildcards and filters are not supported.

    JSON step 15: Paths can also use nested names or array indexes. JSON array indexes start at zero. Use the path examples below the video for keys with spaces. Wildcards and filters are not supported.
  16. Step 16

    Output Type must match the value you want: String, Integer, Decimal, Boolean, String Array, or JSON Text. Our status is text, so keep String. The other output types have their own examples.

    JSON step 16: Output Type must match the value you want: String, Integer, Decimal, Boolean, String Array, or JSON Text. Our status is text, so keep String. The other output types have their own examples.
  17. Step 17

    Set the String output to s2. The original JSON remains in s1, while s2 will contain just the extracted status, without JSON quotation marks.

    JSON step 17: Set the String output to s2. The original JSON remains in s1, while s2 will contain just the extracted status, without JSON quotation marks.
  18. Step 18

    Enable Save Outputs, then independently enable Success with Boolean b1 and Error with String s3. These report whether extraction worked and why it failed, separately from the value in s2.

    JSON step 18: Enable Save Outputs, then independently enable Success with Boolean b1 and Error with String s3. These report whether extraction worked and why it failed, separately from the value in s2.
  19. Step 19

    Invalid JSON, an unsupported path, a missing value, or the wrong output type can fail. Check Success and Error before using a result in a larger script. A successful extraction leaves the Error String empty.

    JSON step 19: Invalid JSON, an unsupported path, a missing value, or the wrong output type can fail. Check Success and Error before using a result in a larger script. A successful extraction leaves the Error String empty.
  20. Step 20

    Test checks the current configuration with available preview values. Here it reports Success and Count one, meaning one value was returned. Test does not save your changes or replace playing the complete script.

    JSON step 20: Test checks the current configuration with available preview values. Here it reports Success and Count one, meaning one value was returned. Test does not save your changes or replace playing the complete script.
  21. Step 21

    Tap OK to save JSON. The live script now prepares s1, then extracts the status into s2.

    JSON step 21: Tap OK to save JSON. The live script now prepares s1, then extracts the status into s2.
  22. Step 22

    Drag PromptMe after JSON. This supporting command makes the extracted value visible, so we can confirm what JSON actually returned.

    JSON step 22: Drag PromptMe after JSON. This supporting command makes the extracted value visible, so we can confirm what JSON actually returned.
  23. Step 23

    Keep Standard mode and set Header to s2. PromptMe will display the result String, not the entire JSON object from s1.

    JSON step 23: Keep Standard mode and set Header to s2. PromptMe will display the result String, not the entire JSON object from s1.
  24. Step 24

    Enable Buttons and add a Done button using Boolean b2. This gives us a clear way to close the confirmation after reading it.

    JSON step 24: Enable Buttons and add a Done button using Boolean b2. This gives us a clear way to close the confirmation after reading it.
  25. Step 25

    Tap OK. The three-command script is ready: prepare the data, extract the status, then display it.

    JSON step 25: Tap OK. The three-command script is ready: prepare the data, extract the status, then display it.
  26. Step 26

    When the script is complete, simply use the Play button in the main overlay.

    JSON step 26: When the script is complete, simply use the Play button in the main overlay.
  27. Step 27

    PromptMe shows Ready. JSON has selected the status property from s1 and written its text into s2. It has not copied the braces, quotes, or the other properties.

    JSON step 27: PromptMe shows Ready. JSON has selected the status property from s1 and written its text into s2. It has not copied the braces, quotes, or the other properties.
  28. Step 28

    Press Done. The confirmation closes and the script finishes automatically.

    JSON step 28: Press Done. The confirmation closes and the script finishes automatically.
  29. Step 29

    Use JSON when later commands need a particular value from structured text. An earlier File or HTTP command can supply that text in a String variable. JSON itself does not open files or make network requests.

    JSON step 29: Use JSON when later commands need a particular value from structured text. An earlier File or HTTP command can supply that text in a String variable. JSON itself does not open files or make network requests.