xxxxxxxxxx
var object = {name: 'Bhavansh'};
var array = [ ]; // Create empty array
// Add object to the array
array.push(object);
// To access the object
console.log(array[0].name);
xxxxxxxxxx
var nietos = [];
var obj = {};
obj["01"] = nieto.label;
obj["02"] = nieto.value;
nietos.push(obj);
xxxxxxxxxx
var nietos = [];
var obj = {};
obj["01"] = nieto.label;
obj["02"] = nieto.value;
nietos.push(obj);
xxxxxxxxxx
<script>
var tutorial = {
"topic" : "Javacript",
"tutor" : "clever_programmer",
"mode" : "online"
};
var arr = [];
for (const property in tutorial) {
arr.unshift( tutorial[property] );
}
console.log(arr);
</script>