Answer the question
In order to leave comments, you need to log in
How to make a 2D array look like a tree?
I have this two dimensional array:
[
["1 сезон", "1 серия", "Лостфилм", "cyx793so9kodfhdwiktl0r6b/212164"],
["1 сезон", "2 серия", "Kinogo", "cyx793so9kodfhdwiktl0r6b/252865"],
["1 сезон", "2 серия", "Амедиа", "cyx793so9kodfhdwiktl0r6b/252865"],
["1 сезон", "3 серия", "Лостфилм", "cyx793so9kodfhdwiktl0r6b/264972"],
["2 сезон", "1 серия", "Лостфилм", "cyx793so9kodfhdwiktl0r6b/212164"],
["2 сезон", "2 серия", "Kinogo", "cyx793so9kodfhdwiktl0r6b/252865"],
["3 сезон", "1 серия", "Kinogo", "cyx793so9kodfhdwiktl0r6b/264972"]
]
Answer the question
In order to leave comments, you need to log in
{
"1 сезон": {
"1 серия": {
"Лостфилм": "cyx793so9kodfhdwiktl0r6b/212164"
},
"2 серия": {
"Kinogo": "cyx793so9kodfhdwiktl0r6b/252865",
"Амедиа": "cyx793so9kodfhdwiktl0r6b/252865"
},
"3 серия": {
"Лостфилм": "cyx793so9kodfhdwiktl0r6b/264972"
}
},
"2 сезон": {
"1 серия": {
"Лостфилм": "cyx793so9kodfhdwiktl0r6b/212164"
},
"2 серия": {
"Kinogo": "cyx793so9kodfhdwiktl0r6b/252865"
}
},
"3 сезон": {
"1 серия": {
"Kinogo": "cyx793so9kodfhdwiktl0r6b/264972"
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question