0
我希望我的API应该像返回数据:API应该数组形式返回数据
"value": [{
"Name": "Name1",
"countries": ["1st Country", "2nd Country", "3rd Country"],
"Address": "Address1"
}, {
"Name": "Name2",
"countries": ["3st Country", "4nd Country", "6rd Country"],
"Address": "Address2"
}]
当我使用它列表,它返回这样的:
"countries": [
{ "Country": "3st Country" },
{ "Country": "4st Country" },
{ "Country": "6st Country" }
]
但是我要像:
"countries": ["3st Country", "4nd Country", "6rd Country"],
能否请您分享一些样本编码来实现它
这个问题仍然有很多模糊的回答。你可以发布你的代码,并澄清你到底在找什么 – Coder