# Newbie alert! Need help in extracting parameters from the po

**URL:** <https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400>\
**Category:** Rails\
**Created:** [January 25, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400 "2007-01-25T19:52:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtorails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f4b2a3/32.png) [@newtorails](https://www.ruby-forum.com/u/newtorails)\
**Post date:** [January 25, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400/1 "2007-01-25T19:52:43Z")

</div>

Could somebody please help me with the following?  
I have following browser dump from the post request which errors in my  
controller  
Parameters: {“commit”=\>“Find”, “item”=\>{“id”=\>“1”}}

I want to extract parameter item[id] from this request. I have tried  
params[:item].id, params[:id] and params[:item[id]].

None of the above seems to help.

thanks

---

<div class="post-metadata">

**Author:** ![newtorails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f4b2a3/32.png) [@newtorails](https://www.ruby-forum.com/u/newtorails)\
**Post date:** [January 25, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400/2 "2007-01-25T19:54:43Z")

</div>

params[:item][:id]

params[:item] returns a hash, which you then index by :id.

---

<div class="post-metadata">

**Author:** ![newtorails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f4b2a3/32.png) [@newtorails](https://www.ruby-forum.com/u/newtorails)\
**Post date:** [January 25, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400/3 "2007-01-25T19:54:43Z")

</div>

params[:item][:id]

one more try and you likely would have got it

Jodi

---

<div class="post-metadata">

**Author:** ![newtorails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f4b2a3/32.png) [@newtorails](https://www.ruby-forum.com/u/newtorails)\
**Post date:** [January 25, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/newbie-alert-need-help-in-extracting-parameters-from-the-po/83400/4 "2007-01-25T19:58:44Z")

</div>

thanks jodi and brad. Really appreciate your responses.
