Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. {
  2. "0": {
  3. "key_1": "value_1",
  4. "key_2": "value_2",
  5. "key_3": "value_3",
  6. "key_4": "value_4",
  7. "key_5": "value_5"
  8. },
  9. "1": {
  10. "key_1": "value_1",
  11. "key_2": "value_2",
  12. "key_3": "value_3",
  13. "key_4": "value_4",
  14. "key_5": "value_5"
  15. },
  16. .
  17. .
  18. .
  19. "n": {
  20. "key_1": "value_1",
  21. "key_2": "value_2",
  22. "key_3": "value_3",
  23. "key_4": "value_4",
  24. "key_5": "value_5"
  25. }
  26. }
  27.  
  28. var data = new google.visualization.DataTable();
  29. data.addColumn('number','increment');
  30. var lastIncrementationArray = this.activations[ Object.keys(this.activations).sort().pop()];
  31. Object.keys(lastIncrementationArray).forEach(function(k){
  32. data.addColumn('number',k);
  33. });
  34.  
  35. var rowIndex = 0;
  36. Object.keys(this.activations).forEach(function(k){
  37. data.addRow();
  38. var currentIncrementationArray = this.activations[Object.keys(k)]
  39. for (i = 0; i < data.getNumberOfColumns(); i++) {
  40. data.setCell(rowIndex, i, currentIncrementationArray[i])
  41. }
  42. rowIndex += 1;
  43. });
Add Comment
Please, Sign In to add comment