【发布时间】:2016-06-01 10:49:37
【问题描述】:
我正在尝试传递一个包含多个对象的对象,如下所示
[Object, Object, Object, Object]
0
:
Object
ProductID
:
"50"
__proto__
:
Object
1
:
Object
BrandID
:
24
__proto__
:
Object
2
:
Object
BrandID
:
26
__proto__
:
Object
3
:
Object
BrandID
:
20
__proto__
:
Object
其中一个对象的键值对与其他对象不同。如何从 Web Api 控制器捕获这些数据。我应该如何在 Web Api 项目中修改我的模型。
【问题讨论】:
-
这里最好显示json,因为显示的数据结构不清楚。
-
json 应该是
object=[{ProductID:"50"},{BrandID:"24"},{BrandID:"26"},{BrandID:"20"}]
标签: javascript c# angularjs object asp.net-web-api