---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: attribute (key, value)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Creates a JSON attribute (or in Java terms, an entry in a map) with ‘key’ and ‘value’. Use `json:attribute` with `json:create`.

## <a id="section_kyy_knp_1tb"></a>Return Type

`Map.Entry`

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
json:attribute(key, value)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>key</td><td>The key in a key/value pair.</td></tr><tr><td>value</td><td>The value in a key/value pair. The value can either be an object or an array of objects.</td></tr></tbody></table><br/>

<b>Example</b>

`json:create(json:attribute('key0', 'value0'), json:attribute('key1', list:toList(1,2,3)))`

Result: `{"key0": "value0", "key1": [1,2,3]}`

