I'd like to create a "cast" object (maybe a class, maybe a function), with possibly other objects inside it, and arrays . The structure I imagine is like this:
postagem: {
titulo: "",
autor: "",
texto: [
{
linha: [{
caractere: '', // isso deveria ser um objeto
data: string, // objeto date?
}],
desfazer: ?, // objetos caractere/data
}
],
}
Explaining:
post should contain: title, author, and text ; text should contain an undefined amount of: line and undo ; line should contain an undefined amount of: character and date ;
Is it possible to build this crazy? How would I use this object?
The idea was to be able to then transfer the instantiated objects this way and forwards using JSON.