This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Receiving a message | |
if (currentCall) { | |
// Define the person sending the message | |
var callerId = currentCall.callerID; | |
var originalMessage = currentCall.initialText; | |
var messageReceived = currentCall.initialText.toLowerCase(); | |
/* | |
//partie à envoyer dans Recast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ruby version 2.1.1 | |
require 'csv' | |
require 'json' | |
def json_to_csv(json_file, csv_file) | |
json_array = JSON.parse(File.open(json_file).read) | |
headers = collect_keys(json_array.first) | |
CSV.open(csv_file, "w", :write_headers=> true, :headers => headers) do |csv| | |
json_array.each { |item| csv << collect_values(item) } |