---
title: "JSON Table Field Manipulation or Calculations"
canonical: "https://support.appfire.com/space/TBL/74815618/JSON%20Table%20Field%20Manipulation%20or%20Calculations"
format: markdown
---
> Macro (div)
> 
> ### On this page
> 
> > Macro (toc)

# Overview

This page shows how to use [Augments](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74814982) for field manipulation or calculations when using the [JSON Table macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815257), which is part of the [Advanced Tables for Confluence](https://appfire.atlassian.net/wiki/spaces/TBL/overview) add-on. In this example, we use [Groovy](https://appfire.atlassian.net/wiki/spaces/SCRP/pages/73728611) scripting to do field modification based on the field data. This is just a simple example of the technique.

Scripting is expensive, so make sure you surround the **json-table** macro with the [Cache Macro](https://appfire.atlassian.net/wiki/spaces/CACHE/pages/66586270) and/or the [Future Macro](https://appfire.atlassian.net/wiki/spaces/CACHE/pages/66585063) to minimize response time for the page. 

Reference: [Using Augments with JSON Table](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74814179).

# Macro Browser Input

### Select this Macro

|  |  |
| --- | --- |
| *Macro Name* | JSON Table |
| *Macro Syntax* | {json-table} |

### Define these Parameters/Values

|  |  |
| --- | --- |
| Body | `[{a: 1495020217, b: 1495020217.0}]` |
| Output format | wiki |
| Augments to data row values | , "{groovy}def x='%1%'; print x.substring(0,10){groovy}" |
| Column types | MX~YYYY-MM-DD, MX~YYYY-MM-DD |

# Example Result

| **A** | **B** |
| --- | --- |
| 2017-05-17 | 2017-05-17 |

# Other Examples

Visit our [full list of product examples](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815984) for additional inspiration!