mogno db and datatable
mogno db and datatable
shashanktiw
Posts: 1Questions: 0Answers: 0
I have data in the mongodb and create a data table from this data.
the data table should have lazy loading feature.
I can create this datatable with lazy loading with sample data but
i am NOT ABLE to map the data coming from the mongodb to what is required. can anybody help me.
my JSON coming is of the format
[code]
{"sEcho":"1","iTotalRecords":100,"iTotalDisplayRecords":10,"aaData":["{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806acf\"} , \"esn\" : \"ESN000000\" , \"deviceID\" : \"tm29869\" , \"associationTime\" : 1363666852927 , \"pepBBStatus\" : \"minor\" , \"bytesTxSinceAssoc\" : 29869 , \"IPv4Address\" : \"0.0.0.255\" , \"IPv6Address\" : \"2001::f:1:1:2\" , \"terminalStatus\" : \"minor\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666852927 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 295234\" , \"txPacket\" : 334}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad0\"} , \"esn\" : \"ESN000001\" , \"deviceID\" : \"tm14414\" , \"associationTime\" : 1363666868382 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 14414 , \"IPv4Address\" : \"0.0.1.0\" , \"IPv6Address\" : \"2001::f:1:1:3\" , \"terminalStatus\" : \"minor\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666868382 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 66496\" , \"txPacket\" : 803}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad1\"} , \"esn\" : \"ESN000002\" , \"deviceID\" : \"tm23736\" , \"associationTime\" : 1363666859060 , \"pepBBStatus\" : \"minor\" , \"bytesTxSinceAssoc\" : 23736 , \"IPv4Address\" : \"0.0.1.1\" , \"IPv6Address\" : \"2001::f:1:1:4\" , \"terminalStatus\" : \"active\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666859060 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 395208\" , \"txPacket\" : 691}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad2\"} , \"esn\" : \"ESN000003\" , \"deviceID\" : \"tm8406\" , \"associationTime\" : 1363666874390 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 8406 , \"IPv4Address\" : \"0.0.1.2\" , \"IPv6Address\" : \"2001::f:1:1:5\" , \"terminalStatus\" : \"major\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666874390 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 160216\" , \"txPacket\" : 841}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad3\"} , \"esn\" : \"ESN000004\" , \"deviceID\" : \"tm26582\" , \"associationTime\" : 1363666856214 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 26582 , \"IPv4Address\" : \"0.0.1.3\" , \"IPv6Address\" : \"2001::f:1:1:6\" , \"terminalStatus\" : \"unknown\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666856214 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 21121\" , \"txPacket\" : 41}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad4\"} , \"esn\" : \"ESN000005\" , \"deviceID\" : \"tm21494\" , \"associationTime\" : 1363666861302 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 21494 , \"IPv4Address\" : \"0.0.1.4\" , \"IPv6Address\" : \"2001::f:1:1:7\" , \"terminalStatus\" : \"active\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666861302 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 383413\" , \"txPacket\" : 45}"]}
[/code]
the data table should have lazy loading feature.
I can create this datatable with lazy loading with sample data but
i am NOT ABLE to map the data coming from the mongodb to what is required. can anybody help me.
my JSON coming is of the format
[code]
{"sEcho":"1","iTotalRecords":100,"iTotalDisplayRecords":10,"aaData":["{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806acf\"} , \"esn\" : \"ESN000000\" , \"deviceID\" : \"tm29869\" , \"associationTime\" : 1363666852927 , \"pepBBStatus\" : \"minor\" , \"bytesTxSinceAssoc\" : 29869 , \"IPv4Address\" : \"0.0.0.255\" , \"IPv6Address\" : \"2001::f:1:1:2\" , \"terminalStatus\" : \"minor\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666852927 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 295234\" , \"txPacket\" : 334}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad0\"} , \"esn\" : \"ESN000001\" , \"deviceID\" : \"tm14414\" , \"associationTime\" : 1363666868382 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 14414 , \"IPv4Address\" : \"0.0.1.0\" , \"IPv6Address\" : \"2001::f:1:1:3\" , \"terminalStatus\" : \"minor\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666868382 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 66496\" , \"txPacket\" : 803}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad1\"} , \"esn\" : \"ESN000002\" , \"deviceID\" : \"tm23736\" , \"associationTime\" : 1363666859060 , \"pepBBStatus\" : \"minor\" , \"bytesTxSinceAssoc\" : 23736 , \"IPv4Address\" : \"0.0.1.1\" , \"IPv6Address\" : \"2001::f:1:1:4\" , \"terminalStatus\" : \"active\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666859060 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 395208\" , \"txPacket\" : 691}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad2\"} , \"esn\" : \"ESN000003\" , \"deviceID\" : \"tm8406\" , \"associationTime\" : 1363666874390 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 8406 , \"IPv4Address\" : \"0.0.1.2\" , \"IPv6Address\" : \"2001::f:1:1:5\" , \"terminalStatus\" : \"major\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666874390 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 160216\" , \"txPacket\" : 841}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad3\"} , \"esn\" : \"ESN000004\" , \"deviceID\" : \"tm26582\" , \"associationTime\" : 1363666856214 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 26582 , \"IPv4Address\" : \"0.0.1.3\" , \"IPv6Address\" : \"2001::f:1:1:6\" , \"terminalStatus\" : \"unknown\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666856214 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 21121\" , \"txPacket\" : 41}","{ \"_id\" : { \"$oid\" : \"5147e7c2c525f86b06806ad4\"} , \"esn\" : \"ESN000005\" , \"deviceID\" : \"tm21494\" , \"associationTime\" : 1363666861302 , \"pepBBStatus\" : \"active\" , \"bytesTxSinceAssoc\" : 21494 , \"IPv4Address\" : \"0.0.1.4\" , \"IPv6Address\" : \"2001::f:1:1:7\" , \"terminalStatus\" : \"active\" , \"lastPolledTime\" : 1363666882796 , \"lastStatusChangeTime\" : 1363666861302 , \"vnoId\" : 0 , \"gatewayID\" : 4 , \"associatedIPGWName\" : \"ipgw_4\" , \"msg\" : \"hello world mongoDB in Java from 383413\" , \"txPacket\" : 45}"]}
[/code]
This discussion has been closed.