---
title: "JSON Table macro - Cloud"
canonical: "https://support.appfire.com/space/TBL/74812316/JSON%20Table%20macro%20-%20Cloud"
format: markdown
---
> Macro (aura-html)

# <span style="color: #000000">Overview</span>

# <span style="color: #000000">Basic use</span>

<span style="color: #000000">This macro can be added to a page using </span><span style="color: #000000">any</span><span style="color: #000000"> of the following methods:</span>

| <span style="color: #000000">**Select from the macro browser **</span>**(Insert elements)** | <span style="color: #000000">*JSON Table*</span><br>![Insert JSON macro using Insert elements](media://aa87f16b-915f-4b74-957e-a81c259ecba7) |
| --- | --- |
| **Markup shortcut (New editor - case insensitive)** | <span style="color: #000000">*/JSON Table*</span><br>![Insert JSON macro using macro shortcut](media://c270ddbb-c923-499b-8472-0e6868e96f0d) |

# <span style="color: #000000">Parameters</span>

The macro parameters are categorized into various tabs, such as **Content**, **Source**, **Structure and Data**, **Sort** **and Filter**, **Style**, and **Export**.

![JSON macro configuration dialog.jpg](media://2461c223-c92c-4314-b541-396f4f986cdf)

> ⚠️ <span style="color: #172b4d">**Parameters removed**</span>
> ⚠️ 
> ⚠️ - <span style="color: #172b4d">The </span>***URL user***<span style="color: #172b4d"> and </span>***URL user password***<span style="color: #172b4d"> parameters have been removed from the </span>***JSON***<span style="color: #172b4d"> </span><span style="color: #172b4d">***Table***</span><span style="color: #172b4d"> macro. </span>
> ⚠️ - <span style="color: #172b4d">Use a </span><span style="color: #172b4d">*[profile](https://appfire.atlassian.net/wiki/x/iYp1B#profiles)*</span><span style="color: #172b4d"> to access the data from a remote location.</span>

## <span style="color: #000000">Macro specific parameters</span>

| <span style="color: #000000">**Tab**</span> | **Macro Editor Label** | <span style="color: #000000">**Default**</span> | <span style="color: #000000">**Description**</span> | <span style="color: #000000">**Macro Parameter**</span> |
| --- | --- | --- | --- | --- |
| Content | Location of JSON data | macro body | Specifies the list of options where JSON data is located. The included data follows the body data based on the location selected. The possible options are:<br>- *blank* - Data is read from the contents in the macro body.
- *^attachment* - Data is read from an attachment that is available on the current page.
- *page^attachment* - Data is read from an attachment available on the specified page in the current space.
- *space:page^attachment* - Data is read from an attachment available on the specified page in a different space. | location |
| URL to JSON data |  | Enter the URL containing the required JSON that are to be processed and rendered. If specified, the included data follows the body and script data. | url |
| Profile |  | Enter the profile name from the list of pre-configured profiles. Contact your administrator to know about the profiles available for your use. Refer to the [Configuration documentation](https://appfire.atlassian.net/wiki/x/iYp1B#profiles) to learn more about profile configuration. | profile |
| URL connection timeout (milliseconds) |  | Enter time in milliseconds such that URL connections do not timeout before getting data. Use this to increase time needed for slow connections. Note that if a zero is given the connection may wait infinitely. | timeout |
| <span style="color: #000000">Structure and Data</span> | Output format | *html* | Specify how the output is formatted. The options are as follows:<br>- *html* - data is entered as standard HTML directly in the macro body.
- *wiki* - data in the table rendered using the wiki renderer. | output |
| File encoding | System default | Specify the encoding for an external file, if different from the Confluence default (like Windows-1252, UTF-8, MacRoman). Refer to [this article](http://en.wikipedia.org/wiki/Character_encoding) for more information. Example: UTF-8. | encoding |
| Paths to fields |  | Specify a single path to generate a single table. Simple form is a dot separated list of field names to reach the specific field within the JSON string. Example: *total.monthlies*.<br>When a comma separated list of paths to fields is provided, a table is produced for each valid field identified in the path. No table is produced for references to fields that cannot be found, are empty arrays, or similar.<br>Paths are expressed in [JSONPath](http://goessner.net/articles/JsonPath/) syntax. | paths |
| Paths to fields to be included | <span style="color: #000000">all fields</span> | <span style="color: #000000">Enter a comma separated list of paths to fields to be included in the output. Paths are relative to the JSON field specified in the paths parameter. If not specified, all fields found are included.</span><br><span style="color: #000000">Example for the </span><span style="color: #000000">*issues*</span><span style="color: #000000"> field from the</span> [Jira search REST API](https://docs.atlassian.com/jira/REST/latest/#d2e417)<span style="color: #000000">:</span>   
<span style="color: #000000">*key, fields.summary,*</span><span style="color: #000000"> </span><span style="color: #000000">*fields.issuetype.name*</span><span style="color: #000000">, </span><span style="color: #000000">*fields.issuetype.id*</span><span style="color: #000000">,</span><span style="color: #000000">* fields.fixVersions[*].name*</span> | <span style="color: #000000">fieldPaths</span> |
| Regex patterns for ordering fields |  | <span style="color: #000000">Enter a comma separated list of</span><span style="color: #505050"> </span><span style="color: #505050">[regular expression (regex)](https://appfire.atlassian.net/wiki/display/info/How+to+use+regular+expressions)</span><span style="color: #505050"> </span><span style="color: #000000">patterns. </span><br><span style="color: #000000">This parameter is used only when the </span><span style="color: #000000">*Paths to fields to be included*</span><span style="color: #000000"> field defaults to all fields; otherwise, the order specified in </span><span style="color: #000000">*Paths to fields to be included*</span><span style="color: #000000"> is used. </span><br><span style="color: #000000">Useful when multiple tables are generated and column ordering is not ideal. Field order is not specific in JSON strings so when field order is important, these regex patterns can be used to control the order. </span><br>> ⚠️ <span style="color: #000000">A field found by an earlier pattern is processed before fields not found or fields found by a later pattern.</span> | <span style="color: #000000">fieldOrderRegexPatterns</span> |
| Paths to be used to determine sort order |  | <span style="color: #000000">Enter a comma separated list of path references to fields (simple only) to be used to determine how rows are initially sorted. </span><br><span style="color: #000000">Paths are relative to the JSON field specified in the </span><span style="color: #000000">*Paths to fields*</span><span style="color: #000000"> parameter. If specified, JSON array elements are sorted based on the comparison of field values represented by the paths. The first path is the primary sort value. Subsequent paths are used only if the first comparison is equal. The sort direction is ascending unless </span><span style="color: #000000">*Sort descending*</span><span style="color: #000000"> is selected. This sorting is done before the HTML is generated for display.</span> | <span style="color: #000000">sortPaths</span> |
| Strip leading qualifiers from generated headings | <span style="color: #000000">false</span> | <span style="color: #000000">Enable to make table heading columns look better by stripping leading qualifiers (using a dot separator (.)) for names generated as a result of </span><span style="color: #000000">*Paths to fields to be included*</span><span style="color: #000000">. For example, </span><span style="color: #000000">*field.type*</span><span style="color: #000000"> would be converted to </span><span style="color: #000000">*type*</span><span style="color: #000000">.</span> | <span style="color: #000000">stripQualifiers</span> |
| Capitalize first character of generated headings | <span style="color: #000000">true</span> | <span style="color: #000000">Enable to make table heading columns look better by capitalizing leading character of names generated as a result of </span><span style="color: #000000">*Paths to fields to be included*</span><span style="color: #000000">.</span> | <span style="color: #000000">capitalize</span> |
| Augments to data row values |  | <span style="color: #000000">Enter a comma separated list of augments to the data row values, one for each column. Specify double quotes for values with a comma.</span><span style="color: #707070"> </span><span style="color: #000000">See</span><span style="color: #707070"> </span>[Augments](https://appfire.atlassian.net/wiki/x/vpZ1B)<span style="color: #707070"> </span><span style="color: #000000">for details.</span> | <span style="color: #091e42">augments</span> |
| Augments to heading row values |  | <span style="color: #000000">Enter a comma separated list of augments to heading row values, one for each column.</span><span style="color: #707070"> </span><span style="color: #000000">See</span><span style="color: #707070"> </span>[Augments](https://appfire.atlassian.net/wiki/x/vpZ1B)<span style="color: #707070"> </span><span style="color: #000000">for details.</span> | <span style="color: #091e42">headingAugments</span> |
| Augments to footing row values |  | <span style="color: #000000">Enter a comma separated list of augments to footing row values, one for each column. See</span><span style="color: #707070"> </span>[Augments](https://appfire.atlassian.net/wiki/x/vpZ1B)<span style="color: #707070"> </span><span style="color: #000000">for details.</span> | <span style="color: #091e42">footingAugments</span> |
| Show wiki | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show a non-formatted version of the wiki table following the formatted table. This is used to help resolve formatting issues. It can also be used to convert CSV to Confluence markup by cut and paste.</span> | <span style="color: #091e42">showWiki</span> |
| Escape special characters in wiki markup | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to allow few special characters to be escaped so that the formatting is unaffected. When wiki output is requested (O</span><span style="color: #000000">*utput format*</span><span style="color: #000000"> is set to </span><span style="color: #000000">*wiki*</span><span style="color: #000000">), some special characters (like '</span>**|**<span style="color: #000000">', '</span>**[**<span style="color: #000000">', '</span>**]**<span style="color: #000000">', '</span>**{**<span style="color: #000000">', '</span>**}**<span style="color: #000000">') in data can cause undesirable formatting of the table. By default, data that has wiki markup is  rendered correctly.</span> | <span style="color: #000000">escape</span> |
| Render wiki markup macros in body | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to render wiki markup macros found in the body prior to processing as CSV. This is useful to run macros from apps such as </span><span style="color: #000000">*Scripting for Confluence*</span><span style="color: #000000">, </span><span style="color: #000000">*Run CLI Actions in Confluence*</span><span style="color: #000000">, </span><span style="color: #000000">*SQL for Confluence*</span><span style="color: #000000">, or similar, that can produce CSV output.</span> | <span style="color: #000000">macros</span> |

## <span style="color: #000000">Common parameters</span>

> Macro (include)

# <span style="color: #000000">Examples</span>

> Macro (children)

# <span style="color: #000000">Other macros</span>

<span style="color: #000000">Below is a list of all other macros available within this app:</span>

- <span style="color: #000000">[Table Plus macro](https://appfire.atlassian.net/wiki/x/fox1B)</span>
- <span style="color: #000000">[CSV (Comma Separated Values) macro](https://appfire.atlassian.net/wiki/x/4It1B)</span>
- <span style="color: #000000">[Attachment Table macro](https://appfire.atlassian.net/wiki/x/OYt1B)</span>

# <span style="color: #000000">Additional references</span>

- [JSON.org home](http://www.json.org/)
- [JSONPath](http://goessner.net/articles/JsonPath/)
- [Jira REST API Example - Query issues](https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Query+issues)
- [Confluence Remote API Content examples](https://developer.atlassian.com/display/CONFDEV/Remote+API+Content+Examples)
- [Scripting for Confluence](https://appfire.atlassian.net/wiki/spaces/SCRP)
- [Run CLI Actions in Confluence](https://appfire.atlassian.net/wiki/spaces/CCLI)
- [How to deal with templates on Confluence 4.3 and later](https://appfire.atlassian.net/wiki/spaces/info/pages/86120194)