Hi,
I need to convert my array of hashes to json:
edu_items.each do |edu| @education[i] = { "degree" => "xxx", "major" => "xxx", "name" => "yyy", "start_date" => "Xxxx", "end_date" => "xxx", "notes" => "xxxx" } i = i + 1 end
Number of items in edu_items can vary, but the number of fields in each item is fixed and are defined in that loop. All values are strings.
I want to convert the formed array of hashes to json so that i can pass them down to a form and get them back too.
I was using : @education.to_json(nil,1) to do so. But it fails if number of items increase. I feel it gets truncated or something..not sure though.
Can someone advise me ?
Regards, SG