json数组转换为表中的字符串

时间:2018-03-07 01:16:34

标签: javascript angularjs

我有一个HTML表格,我在使用AngularJS。我想要实现的只是使返回的数组,显示为常规字符串而不是数组。我也希望正确显示日期。

[{"userId":12,"username":"Smith, Al","date":"2018-03-07T01:00:07.895Z","value":"Pending; CA; good"}]

1 个答案:

答案 0 :(得分:0)

可能你想要这样的东西:

public func addComplex(somethingAA:  String, complex:(somethingBB:  String,  somethingCC:  Int)) {

    self.somethingA = somethingAA;
    self.somethingB = complex.somethingBB
    self.somethingC = complex.somethingCC
    self.complexes = [somethingAA:[somethingBB:somethingCC]]
}

https://plnkr.co/edit/b5sya2rzZnGRbakE26iu?p=preview