# Set Config Plugin JavaScript API doesn't suppport nested object?

**URL:** https://forum.kintone.dev/t/set-config-plugin-javascript-api-doesnt-suppport-nested-object/34
**Category:** General
**Created:** [March 7, 2017, 4:43am UTC](https://forum.kintone.dev/t/set-config-plugin-javascript-api-doesnt-suppport-nested-object/34 "2017-03-07T04:43:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [March 7, 2017, 4:43am UTC](https://forum.kintone.dev/t/set-config-plugin-javascript-api-doesnt-suppport-nested-object/34/1 "2017-03-07T04:43:50Z")

</div>

Hi there!

I try to make plugin with reading this pages.  
[https://developer.kintone.io/hc/en-us/articles/212494958/](https://forum.kintone.dev/hc/en-us/articles/212494958/)

In Set Config section,&nbsp;config parameter works in this example.

* * *

## var config =&nbsp;{ &nbsp; "key1": "value1", &nbsp; "key2": "value2" } kintone.plugin.app.setConfig(config)

but when I change "value1" and "value2" like this, error happens.

## Nested object

## var config =&nbsp;{ &nbsp; "key1": **{**  **&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "key1-1":"value1-1",**  **&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "key1-2":"value1-2"**  **&nbsp; }** , &nbsp; "key2": **{**  **&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "key2-1":"value2-1",**  **&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "key2-2":"value2-2"**  **&nbsp; }** } kintone.plugin.app.setConfig(config) \>Uncaught Error: Usage: kintone.plugin.app.setConfig(config, opt\_callback)

how can I save nested object?

## \*Edited Number Data Type also doesn't&nbsp;seem to work

## var config =&nbsp;{ "key1": 1, "key2":&nbsp;2 } kintone.plugin.app.setConfig(config) \>Uncaught Error: Usage: kintone.plugin.app.setConfig(config, opt\_callback)

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [March 8, 2017, 5:08pm UTC](https://forum.kintone.dev/t/set-config-plugin-javascript-api-doesnt-suppport-nested-object/34/2 "2017-03-08T17:08:00Z")

</div>

Hello Masa!

It seems like the value only accepts text so it needs to be something like the following:

var config = {

&nbsp; “key1-1”: “value1-1”,

&nbsp; “key1-2”: “value1-2”,

&nbsp; “key2-1”: “value2-1”,

&nbsp; “key2-2”: “value2-2”

}

kintone.plugin.app.setConfig(config);

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [March 9, 2017, 6:57am UTC](https://forum.kintone.dev/t/set-config-plugin-javascript-api-doesnt-suppport-nested-object/34/3 "2017-03-09T06:57:12Z")

</div>

Hi Yuzo Arai:)

\>It seems like the value only accepts text  
I understand! I use JSON.stringify() when I use&nbsp;nested object.

Thanks \<3
