JSFiddle - React, Tailwind, and code Playground

by Michele Marcucci

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.js"></script>

JavaScript

var op1 = {};

op1 = {
    ans: 'ans',
    cor: 'cor'
};

op2 = {
    ans: 'ans',
    cor: 'cor'
};

var qus = {
    qus: "what is your name?",
    options: []
};

qus.options.push(op1, op2);

alert(JSON.stringify(qus));