I have a serialised object
{
a: “test”,
B[1].Name : “test”,
B[1].Surname : “testing”,
Etc.
But when I sent this object in using ajax Post method in cshtml file, my model is setting the list of b to null
When I’m actual fact I am sending data, but not in the correct format for the controller to understand
How do I serialise the object even further to send the correct model to the controller like
{
a: “test”,
B: {{ Name : “test”,Surname : “testing”}}
Etc.
B? From your first example, it looks like a List of objects? which would be something likeB: [{"Name": "test", "Surname": "testing"}]. But what do you mean by "how do I serialize"? You don't do it manually, do you?