Of course! Thank you.
So the data comes out formatted correctly that way, but then I try and do some manipulation with it and push it back into a hash. But it comes out improperly formatted and out of order. This is what I do
%hashData = (
id => $total_cdr_count,
col2 => $total_call_count,
col3 => $total_error_count,
col4 => $formatMin,
col5 => $formatASR,
col6 => $formatPDD,
col7 => $formatDUR,
col8 => $hold_max_date
);
push @output, %hashData;
And after encoding, it looks like this
{"myData":["col7",null,"col5",null,"col3",0,"col8","2007-08-10 00:59:5
+8","col2",0,"id",3951,"col4",null
,"col6",null,"col7",null,"col5",null,"col3",0,"col8","2007-08-10 00:59
+:58","col2",0,"id",3961,"col4"
,null,"col6",null,"col7",null,"col5",null,"col3",0,"col8","2007-08-10
+00:59:58","col2",0,"id"
the null is fine, I need to fix a few references, but it's out of order, and it looks like it is putting commas in places where a colon should be for json encoding? Also looks like it isn't putting the {} in between records.
Here's an example of what it should look like coming out
{"myData":[{"id":"08-10-2007.00","col2":null,"col3":"I","col4":"0","co
+l5":"3951","col6":null,"col7":"8028"
,"col8":"0"},......
|