<?php
$children = $page->children()->map(function ($child) {
  return [
    'title' => $child->title()->value(),
    'url' => $child->url(),
    'uri' => $child->uri(),
    'uri' => '/' . $child->uri(),
    'modified' => $child->modified('Y-MM-d'),
    'status' => $child->status(),
    'logo' => $child->client()->toPage()->logo()->toFile()->url(),
  ];
})->values();

$specificData = [
  "children" => $children,
];

$data = array_merge($genericData, $specificData);

echo json_encode($data);
