asp.net mvc4 action能否一并返回多个不同内容的JSON数据

2024-11-29 16:14:14
推荐回答(1个)
回答1:

合并成一个
{json1:[{ "id":1,
"text":"text1" },{ "id":2,
"text":"text2" },{ "id":3,
"text":"text3"},{ "id":4,
"text":"text4" },{ "id":5,
"text":"text5" }],
json2:[{ "code":1,
"Value":"value1" },{ "code":2,
"Value":"value2" },{ "code":3,
"Value":"value3"},{ "code":4,
"Value":"value4" },{ "code":5,
"Value":"value5" }]
}