I am working with a specific object structure in my code:
lines: [{
order: '1',
text: ' blue'
},{
order: '2',
text: 'green'
},{
order: '3',
text: 'yellow'
}]
Currently, this object is displayed on the page as follows:
Blue
Green
Yellow
My goal is to rearrange these elements and update the object without using drag-and-drop functionality. Instead, I would like to implement buttons for moving items up and down. The desired layout should be like this:
Blue - [down]
Green [up, down]
Yellow [up]
Each bullet point represents a component. Can someone guide me on how to achieve this?