我有一个看起来像这样的JSONObject
[{"key1":1,"key2":"yyy","key3":"4"..........},
{"key1":2,"key2":"xxx","key3":"5"...........},
{"key1":3,"key2":"zzz","key3":"6"...........}]
我需要将其转换为简单的2D数组并删除所有键。仅保留值
[{1,"yyy","4",..........},
{2,"xxx","5",...........},
{3,"zzz","6",...........}]
我尝试了迭代和循环处理,这似乎太麻烦了。是否有任何drop_keys
函数可以做到?
答案 0 :(得分:2)
public async Task<IHttpActionResult> TryExecuteTransactionalFuncAsync(Func<Task<IHttpActionResult>> apiTask)
{
using (var transaction = new DatabaseTransaction(DbContext.Database.BeginTransaction()))
{
var output = await apiTask.Invoke();
transaction.Complete();
return output;
}
}