Message from JavaScript discussions
February 2018
— We would have to need to know the structure of your objects to know what you actually want
Actually, i was thinking about visual object state backup/restore, this object is a widget 'accordion' with panels inside. I clone initial data structure (object) and then user interact with it, some new properties are created in there, but they are needless/temporary.. that's the story
— Right, but we need the structure
— Not the backstory
— It's TOP SECRET!!!11🤤 joking. i've posted sheme upper👆 there..
— No you haven't
— Yes, i did, Array [panels] == [{panel}{panel}{panel}....], Object {panel} == {...someProps... panels: {panels}}
— Runnable code
— What is the structure of panels
?
what is the structure of panel
?
what is the structure of someProps
?
— Show an actual object
— Panels: [
{
title: 'title #1'
content: 'content'
}
{
title: 'title #2'
panels: [
{
title: 'title #2-1'
content: 'text2-1'
}
{
title: 'title #2-2'
panels: [
{
title: 'title #2-2-1'
content: 'text2-2-1'
}
{
title: 'title #2-2-2'
content: 'text2-2-2'
}
{
title: 'title #2-2-3'
content: 'text2-2-3'
}
]
}
{
title: 'title #2-3'
content: 'text2-3'
}
]
}
{
title: 'title #3'
content: 'text3'
}
]
— Alright, so this is the initial object?