jsontochart 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jsontochart.rb +5 -5
- metadata +1 -1
data/lib/jsontochart.rb
CHANGED
@@ -74,11 +74,11 @@ class JSONToChart
|
|
74
74
|
tmpstring = tmpstring + dhash[key].to_s
|
75
75
|
elsif dhash[key].is_a? Array
|
76
76
|
hold = "'"
|
77
|
-
|
77
|
+
z = 0
|
78
78
|
dhash[key].each do |i|
|
79
|
-
|
80
|
-
hold = hold + i
|
81
|
-
if dhash.
|
79
|
+
z += 1
|
80
|
+
hold = hold + i.to_s
|
81
|
+
if j < dhash[key].length
|
82
82
|
hold = hold + ","
|
83
83
|
end
|
84
84
|
end
|
@@ -86,7 +86,7 @@ class JSONToChart
|
|
86
86
|
tmpstring = tmpstring + hold
|
87
87
|
else tmpstring = tmpstring + "'" + dhash[key].to_s + "'"
|
88
88
|
end
|
89
|
-
else tmpstring = tmpstring + "
|
89
|
+
else tmpstring = tmpstring + "null"
|
90
90
|
end
|
91
91
|
|
92
92
|
# Check if it is the end of the line and append correct characters
|