src/functions/questions_handler.rb
def parse_items(items)
  items.map{|item|
    {
      id: item['ID'].to_i,
      question: item['question'],
      options: item['options']
    }
  }
end
# Function for parsing the elements retrieved by the DB
Function for parsing the elements retrieved by the DB
Function for parsing the elements retrieved by the DB
def parse_items(items)
  items.map{|item|
    {
      id: item['ID'].to_i,
      question: item['question'],
      options: item['options']
    }
  }
end
def parse_items ( items ) items . map { | item | { id : item [ 'ID' ] . to_i , question : item [ 'question' ] , options : item [ 'options' ] } } end
Function for parsing the elements retrieved by the DB
Function for parsing the elements retrieved by the DB
items