Possible to get jquery .serializeArray() values out by key name?
- by chobo2
Hi
I am using the jquery .serializeArray() function and I send it to the server and that works all good.However I need to update a couple things on the client side that are serialized.
So instead of doing another selector on the textbox I want to just grab it out of the serialized array.
I am not sure how to do this
Product=Test&Qty=50
So say if I have something like this. I can I do something like this
var sendFormData = form.serializeArray();
var val = sendFormData["Product"].value;
but this seems not to work. I only can get it to work when I do something like this
var sendFormData = form.serializeArray();
var val = sendFormData[0].value;
I really don't want to do it by index since that means if the order changes the values could be all wrong. If you could do it by like keyname then that would not be a problem.