# Server Side Scripting

**URL:** <https://community.dreamfactory.com/t/server-side-scripting/514>\
**Category:** Server-Side Scripting\
**Created:** [October 30, 2014, 3:58pm UTC](https://community.dreamfactory.com/t/server-side-scripting/514 "2014-10-30T15:58:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonyjsmith](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/antonyjsmith/32/1203_2.png) [@antonyjsmith](https://community.dreamfactory.com/u/antonyjsmith)\
**Post date:** [October 30, 2014, 3:58pm UTC](https://community.dreamfactory.com/t/server-side-scripting/514/1 "2014-10-30T15:58:41Z")

</div>

Using server-side scripting can anybody please tell the me method I would use to interrogate any values inside ‘event.request.body’.

I’m trying to perform some logic at the step ‘user.register.post.pre\_process’ the usual object notation doesn’t seem to work and it’s driving me nuts! A simple example would be:

```
if (event.request.body.email == 'my@email.com') {
    
    throw 'we have a match';
    
}

```

I’ve tried various different formats to no avail.

Many thanks

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [October 30, 2014, 4:09pm UTC](https://community.dreamfactory.com/t/server-side-scripting/514/2 "2014-10-30T16:09:22Z")

</div>

There’s a bug where for user events event.request.body comes back as a string rather than an object. We should have it fixed in the next day or so. Until then you can use JSON.parse(event.request.body).email.

---

<div class="post-metadata">

**Author:** ![antonyjsmith](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/antonyjsmith/32/1203_2.png) [@antonyjsmith](https://community.dreamfactory.com/u/antonyjsmith)\
**Post date:** [October 30, 2014, 4:30pm UTC](https://community.dreamfactory.com/t/server-side-scripting/514/3 "2014-10-30T16:30:20Z")

</div>

That works, thanks Todd.

Didn’t realise it was a string, I’d foolishly assumed it was just the browser encoding the characters!

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [October 31, 2014, 2:23pm UTC](https://community.dreamfactory.com/t/server-side-scripting/514/4 "2014-10-31T14:23:42Z")

</div>

event.request.body problem is fixed and will be in 1.8.1 release early next week.
