I recently started to study destructuring, but I haven’t come across this yet. I ran into a problem that I don't know how to draw an array of objects endlessly depending on its contents...
const items={
title: 'Production',
subTasks: [
{
title: 'Production 1',
subTasks: [{ title: 'Production 1 - 1' }, { title: 'Production 1 - 2' }],
},
],
}
to get this html
<div style="padding-left:25px">
<h4>Production</h4>
<div style="padding-left:25px">
<h4>Production 1</h4>
<div style="padding-left:25px">
<h4>Production 1 - 1</h4>
<h4>Production 1 - 2</h4>
</div>
</div>
</div>
and so on arbitrarily, depending on whether the object has subTasks... I will be very grateful for the help!!!