davidcalhoun/jstoxml — pull request #14 by luxigo (2014-03-19 17:08:57+00:00)
Title: fix formatting for array of objects

js={
result: {
"test":false,
"testArray":[
{
"val1":6.087398,
"test2":46.218875,
"time":{
"year":2013,
"month":10,
"day":6,
"hour":15,
"minute":23,
"second":59.042738
},
"test3":{"elements":[[6.123031769111886e-17, 0, -1, 0], [0, 1, 0, 0], [1, 0, 6.123031769111886e-17, 0], [0, 0, 0, 1]]}
},
{
"val1":3.087398,
"test2":6.218875,
"time":{
"year":2014,
"month":11,
"day":1,
"hour":11,
"minute":21,
"second":51.042738
},
"test3":{"elements":[[1.031769111886e-17, 1, -2, 1], [2, 2, 2, 2], [2, 2, 2.123031769111886e-17, 2], [2, 2, 2, 1]]}
}
]
}
}

Now give the expected result below:

false

6.087398
46.218875

2013
10
6
15
23
59.042738

6.123031769111886e-170-10
0100
106.123031769111886e-170
0001

3.087398
6.218875

2014
11
1
11
21
51.042738

1.031769111886e-171-21
2222
222.123031769111886e-172
2221