* @param {boolean=} includeLabel * @return {!Array<?>} * @override
(includeLabel = true)
| 2470 | * @override |
| 2471 | */ |
| 2472 | toArray(includeLabel = true) { |
| 2473 | const arr = [ |
| 2474 | this.questionId_, // field 1 - question_id |
| 2475 | this.questionText_, // field 2 - question_text |
| 2476 | this.questionCategory_, // field 3 - question_category |
| 2477 | this.surveyAnswers_ ? this.surveyAnswers_.map(item => item.toArray(includeLabel)) : [], // field 4 - survey_answers |
| 2478 | ]; |
| 2479 | if (includeLabel) { |
| 2480 | arr.unshift(this.label()); |
| 2481 | } |
| 2482 | return arr; |
| 2483 | } |
| 2484 | |
| 2485 | /** |
| 2486 | * @return {string} |