I have a json string.
There are multiple subcategories within the json string depending on the category. I want to combine them all. It should always give the Id of the last child level of a higher level.
Sample :
Id - Name
-- ----------
1239 - Accessory> Jewelery > wristband> Silver wristband
Run Code Online (Sandbox Code Playgroud)
Can anyone help me . Thanks
{
"categories": [
{
"id": 368,
**"name": "Accessory ",**
"parentId": null,
"subCategories": [
{
"id": 396,
**"name": "Jewelery ",**
"parentId": 368, …Run Code Online (Sandbox Code Playgroud)