# How to create a new Body json field with combining all active keys in x-www-form-urlencoded

**URL:** <https://community.postman.com/t/how-to-create-a-new-body-json-field-with-combining-all-active-keys-in-x-www-form-urlencoded/36390>\
**Category:** Help Hub\
**Tags:** pre-request-script\
**Created:** [June 20, 2022, 8:09pm UTC](https://community.postman.com/t/how-to-create-a-new-body-json-field-with-combining-all-active-keys-in-x-www-form-urlencoded/36390 "2022-06-20T20:09:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [June 21, 2022, 6:57pm UTC](https://community.postman.com/t/how-to-create-a-new-body-json-field-with-combining-all-active-keys-in-x-www-form-urlencoded/36390/4 "2022-06-21T18:57:52Z")

</div>

Hmm, ok …

So if you have the JSON for the ‘body’ Key … could you not stringify that JSON in the pre-req script and then feed it in as a variable?

Similar to what is described in this thread?

> [@JSON Stringify request body using raw](https://community.postman.com/t/json-stringify-request-body-using-raw/5526):
>
> Hello, We’re using API Gateway and the request body needs to be stringified before sending. Right now, I the request body with a json under “raw” and the content-type of application/json. I’ve tried using: var body = { name: 'Test' }; pm.environment.set('req\_body', JSON.stringify(body)); Then passing in {{req\_body}}, but it’s coming in as the whole stringified object as a key with an empty value. Any ideas in this particular scenario how to get this to work in Postman? Thank you

---

_[View the full topic](https://community.postman.com/t/how-to-create-a-new-body-json-field-with-combining-all-active-keys-in-x-www-form-urlencoded/36390)._
