javascript - How to pass LIST to view as JSON in MVC asp.net -
but in format:
{ "data": [ { "first_name": "robert", "last_name": "meczybula", "id": 12421 ... }, ... ]}
basically want transform list desired data contract. linq this:
var transform = new { data = data.select(x => new { x.first_name, x.last_name, ... }), ... };
then serialize , return transform object.
Comments
Post a Comment