For my project, I require icons to be structured as an array of objects, similar to the format below:
[
{
"id": 1,
"title": "Title text",
"icons": [
{
"icon": "icon-1.png",
"main": true
},
{
"icon": "icon-2.png",
"main": false
},
{
"icon": "icon-3.png",
"main": false
}
]
}
]
The entities involved are defined as follows:
@PrimaryGeneratedColumn()
id: number;
@Column()
title: string;
Now the question arises, how can these icons be created?