JSON functions

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

These smart value functions are for converting issue fields into the JSON format, usually used in advanced field editing and send web request.
The following documentation examples are assuming an issue with two versions ("Version 2.0" and "Version 3.0"), a custom single select called Decision with a selected value of "Yes" and a summary titled "Hello World".


  • Applies to: text type fields and values

Used to take a text property and render it as a string in JSON format. This will escape any special characters contained in the string.

// Produces
"Version 2.0"

// Produces
"Hello World"

// Produces


  • Applies to: lists of text/number type values

Used to transform a list of values into a JSON encoded list of values. It can also be used to convert a list of numbers into a list of JSON encoded strings as shown in the second example below.

// Produces
["Version 2.0","Version 3.0"]

// Produces


  • Applies to: lists of number type values

Used to transform a list of number values into a JSON encoded list. The second example below shows the power of this function. We're using a text function to remove the word "version" from each fix version (so we get a list of "2.0 and "3.0") which we can then use asJsonArray to turn it into a list of numbers.

Numbers only

Make sure that you do not use this function with lists of text values as you can apply it to them but it will not render them correctly.

// Produces

// Produces


  • Applies to: text type fields and values

Used to transform a text value into a JSON key/value pair object. The keyName property is used as the name of the field, as you can see in the examples below.

// Produces
{ "title": "Hello World" }

// Produces
{ "implementing": "Yes" }

// Produces
{ "title": "Version 2.0" }


  • Applies to: lists of objects (such as fixVersions or a custom multi select)

This is an older function that doesn't have the flexibility of the others. It allows you to extract one attribute of an object into a JSON key/value pair object but you cannot change the name of the key.
In the example below we've got a custom multi select field with two values selected ("Bob" and "Jill") to show how this would work on another field. A custom multi select field is a list of objects that have id and value properties.
The next section shows how you can extract a property as key/value pair object while also changing the key name.

// Produces
[{ "name": "Version 2.0" },{ "name": "Version 3.0" }]

// Produces
[{ "value": "Bob" },{ "value": "Jill" }]

Chaining functions

This example shows how you can chain two of the above functions to extract a property from an object into a JSON key/value pair while also changing the name of the key. In this case we're selecting the name property of the fixVersions.

// Produces
[{ "title": "Version 2.0" },{ "title": "Version 3.0" }]

The example below is achieving the same thing as using asJsonStringArray directly but it serves to show how you could join the methods together if you wanted to.

// Produces
["Version 2.0","Version 3.0"]
Last modified on Jun 21, 2022

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.