jsontochart 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
|