# Create json object with the content of multiple input text when a button is pressed

**URL:** <https://discourse.nodered.org/t/create-json-object-with-the-content-of-multiple-input-text-when-a-button-is-pressed/54693>\
**Category:** Dashboard\
**Created:** [3 December 2021 22:47 UTC](https://discourse.nodered.org/t/create-json-object-with-the-content-of-multiple-input-text-when-a-button-is-pressed/54693 "2021-12-03T22:47:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 December 2021 00:48 UTC](https://discourse.nodered.org/t/create-json-object-with-the-content-of-multiple-input-text-when-a-button-is-pressed/54693/2 "2021-12-04T00:48:58Z")

</div>

Hi. Welcome to the forum.

> [@lescrisam](#):
>
> would like to create a java object

FYI, this JavaScript (very different from Java & such searching for help on Java will not get answers for JavaScript)

> [@lescrisam](#):
>
> I tried to store the content of the inputtext in 3 context variables but i am obviously doing something wrong

This is (one of the ways) you can approach the problem. What have you done and why does it not work? post a minimal flow demonstrating the issue & someone will help you out.

* * *

Note: it is important to surround your code/flow with three backticks

`````  
`like this`  
`````

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

_[View the full topic](https://discourse.nodered.org/t/create-json-object-with-the-content-of-multiple-input-text-when-a-button-is-pressed/54693)._
