def convert_to_hash(data)
      data.map do |item|
        item[:key].split('/').reverse.reduce(item[:value]) { |h, v| { v => h } }
      end.reduce(:deep_merge)
    end
def convert_to_hash(data)
      data.map do |item|
        item[:key].split('/').reverse.reduce(item[:value]) { |h, v| { v => h } }
      end.reduce(:deep_merge)
    end
Converts k/v data into ruby hash