Guest User

Guest User

  • Tech Writer
  • 103
  • 13.5k

Face Null Value Post Data.

May 27 2021 11:40 AM
This is my code I have Post data 
$(document).ready(function () {
$("#form").submit(function (e) {
e.preventDefault();
var arr = [];
$('[name="accesories"]:checked').each(function (x, y) {
debugger;
var obj = {
"toPlayerId": $(this).val()
}
arr.push(obj);
});
var model = {
"toSubject": $("#toSubject").val(),
"toMessage": $("#toMessage").val(),
"toPlayerId": arr
 
Here toPlayerId - null 
 

Answers (1)