I am trying to split the below array
{
"Base/Brand/0101-color-brand-primary-red": "#fe414d",
"Base/Brand/0106-color-brand-secondary-green": "#00e6c3",
"Base/Brand/0102-color-brand-primary-light-gray": "#eaecf0",
"Base/Brand/0107-color-brand-secondary-black": "#000000",
"Base/Brand/0103-color-brand-primary-white": "#ffffff",
"Base/Brand/0108-color-brand-secondary-dark-gray": "#b4b4b4",
"Base/Brand/0104-color-brand-secondary-blue": "#079fff",
"Base/Light/Extended/Red/0201-color-extended-900-red": "#7f1d1d",
"Base/Brand/0105-color-brand-secondary-yellow": "#ffe63b",
"Base/Light/Extended/Red/0202-color-extended-800-red": "#991b1b"
}
to something like this
{
"Base": {
"Brand": {
"0101-color-brand-primary-red": "#fe414d",
"0106-color-brand-secondary-green": "#00e6c3",
"Light": {
"Extended": {
"Red": {
"0201-color-extended-900-red": "#7f1d1d",
"0202-color-extended-800-red": "#991b1b"
}
}
}
}
}
}
Basically I need to split array by '/' and create nested array Please help how can I achieve this.