0
Follow
0
Followers
var rows1 = new Array();
var rows2 = new Array();
var table1 = {
type: 'table',
title: '交易所信息',
rows: rows1,
}
var table2 = {
type: 'table',
title: '交易所信息2',
rows: rows2,
}
var t_r = new Array();
t_r.push("okex");
rows1.push(t_r);
t_r.push("huobi");
rows1.push(t_r);
var t_r2 = new Array();
t_r2.push("huobi");
rows2.push(t_r2);
t_r2.push("xxxxx");
rows2.push(t_r2);
table1.rows = rows1;
table2.rows = rows2;
LogStatus( '`' + JSON.stringify([table1, table2]) + '`');
js 테이블 디스플레이를 c++로 변환하는 방법
Related Recommendations
symbol not setGetTicker: 400: {"code": 2, "data": {}, "message": "invalid params"}gateio getdepth 502Decrypt: Secret key decrypt failedGetOrders: 400: {"code":-1121,"msg":"Invalid symbol."}HTTP 403 errorBitcoin trading by using botsPlease translate the buy plan pageRunning botvs docker on androidhttp://www.stevenwu.me/archives/871
Comment
All comments (2)
void main() {
json tbl = R"({"type" : "table", "title" : "AAA", "cols" : ["Head1", "Head2"], "rows": []})"_json;
tbl["rows"].push_back({"111", "222"});
tbl["rows"].push_back({"col2", "col22"});
LogStatus("`"+tbl.dump()+"`");
}
附带的JSON库很强大, 可以看下github文档 https://github.com/nlohmann/json
基本上可以很优雅的实现
9 years ago
- 1
