<?php
include("connectSQL_Component.php");
$table = [];
$sql = "SELECT DISTINCT object FROM [BIMComponents].[dbo].[API_Table]";
$fetchResult = sqlsrv_query($conn, $sql);
while ($row = sqlsrv_fetch_array($fetchResult)) {
    if($row["object"]!=null)
    array_push($table,$row);
}

echo json_encode($table);


sqlsrv_close($conn);
