SHOW:
|
|
- or go back to the newest paste.
| 1 | - | //This |
| 1 | + | |
| 2 | - | function Foo(a, b){
|
| 2 | + | var tempData = $parseJSON(JSONString); |
| 3 | - | var self = this; |
| 3 | + | |
| 4 | - | |
| 4 | + | var data = []; |
| 5 | - | self.a = a; |
| 5 | + | |
| 6 | - | self.b = b; |
| 6 | + | for(int i = 0; i < tempData.length; i++){
|
| 7 | - | } |
| 7 | + | current = tempData[i]; |
| 8 | data.push(new Foo(current.a, current.b)); | |
| 9 | - | var data = [new Foo("a", "b"), new Foo("aa", "bb")];
|
| 9 | + | } |