Показать сообщение отдельно
  #2 (permalink)  
Старый 17.08.2022, 20:34
Аспирант
Отправить личное сообщение для Olga27 Посмотреть профиль Найти все сообщения от Olga27
 
Регистрация: 10.06.2021
Сообщений: 49

Часть 1:
<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">


  <title>Создание дерево из объекта</title>
  
</head>

<body >
  <div id="tree"></div>
  
 
      <script>
var data = {
  "response": [
    {
      "title":"test1",
      "status":"current",
      "text":"text1",
      "Discription":"Описание1",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_1_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_1_1.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"774",
              "height":"960",
              "url":"https://site.ru/image/big_1_2.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_1_2.jpg"
            }
        }
        
      ]
     },
     {
      "title":"test2",
      "status":"wait",
      "text":"text2",
      "Discription":"Описание2",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_2_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_2_1.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_2_2.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_2_2.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_2_3.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_2_3.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_2_4.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_2_4.jpg"
            }
        }
        
      ]
     },
     {
      "title":"test3",
      "status":"wait",
      "text":"text3",
      "Discription":"Описание3",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_3_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_3_1.jpg"
            }
        }
      ]
     },
     {
      "title":"test4",
      "status":"wait",
      "text":"text4",
      "Discription":"Описание4",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_4_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_4_1.jpg"
            }
        }
      ]
     },
     {
      "title":"test5",
      "status":"wait",
      "text":"text5",
      "Discription":"Описание5",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_5_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_5_1.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_5_2.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_5_2.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_5_3.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_5_3.jpg"
            }
        }
      ]
     },
     {
      "title":"test6",
      "status":"wait",
      "text":"text6",
      "Discription":"Описание6",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_6_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_6_1.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_6_2.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_6_2.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_6_3.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_6_3.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_6_3.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_6_3.jpg"
            }
        }
      ]
     },
     {
      "title":"test7",
      "status":"wait",
      "text":"text7",
      "Discription":"Описание7",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_7_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_7_1.jpg"
            }
        }
      ]
     },
     {
      "title":"test8",
      "status":"wait",
      "text":"text8",
      "Discription":"Описание8",
      "photo":[
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_8_1.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_8_1.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_8_2.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_8_2.jpg"
            }
        },
        {
          "big":
            {
              "status":"wait",
              "width":"772",
              "height":"960",
              "url":"https://site.ru/image/big_8_3.jpg"
            },
          "small":
            {
              "status":"wait",
              "width":"105",
              "height":"130",
              "url":"https://site.ru/image/small_8_3.jpg"
            }
        }
      ]
     },
....
Ответить с цитированием