I have an XML document that I have parsed into JSON. The element values have an odd structure.
{
"id": [
"62314"
],
"artnr": [
"OBS6680"
],
"categories": [
{
"category": [
{
"cat": [
{
"id": [
"153"
],
"title": [
"Lingerie"
]
},
{
"id": [
"184"
],
"title": [
"Catsuits"
]
}
]
}
]
}
]
}
The top-level elements I use
@IsArray()
@ArrayNotEmpty()
@IsString({ each: true })
I am unclear about how to add the categories element into the DTO.
Any pointers will be great.
Thanks