0

I have an object which I created like the following,

var test=[];
test.car=1
test.bike=2
test.cycle=3

Result: [car: 1, bike: 2, cycle: 3]

and i have a controller which is expecting

public ActionResult insertTransport(transportModal test)

when i write data:JSON.stringify(test) the value from data:JSON.stringify(test) is coming like [] what i need to do to stringify the object test?

0 Answers0