I am sending an array object which right now looks like this in my console:
[{
}]
but I want to have it like this:
{
}
Could someone tell me how to change it, to my desired form? this is how my documentsArray looks:
documentsArray = [];
This is how my code looks like this:
uploadFile2(files: FileList | null): void {
const file = files.item(0)
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = () => {
this.documentsArray.push({documentType: this.form.controls.dokumentType.value, file: reader.result})
console.log(this.documentsArray)
}
}