1
I am selecting my form to then convert it to JSON, and I need to remove the string "PessoaViewModel.
" of all Fields. The serialized data looks like this:
"PessoaViewModel.Id=2&PessoaViewModel.PessoaNatureza=Juridica&PessoaViewModel.PessoaFisicaViewModel.PessoaId=2&"
Instead of staying "PessoaViewModel.Id=2"
, should stay "Id=2
".
var pessoaViewModel = $("form :input")
.filter(function (index, element) {
return $(element).val() != '';
})
.serialize();
Someone knows how to help me?
I get it. Thank you :)
– Master JR