How to limit the display of only 10 news headlines after loading the list of news headlines in json

how to limit the display of only 10 news headlines after loading the list of news headlines in json? Because there are hundreds of pieces of news information in the json file, how to make it display only 10 pieces of news?

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .item {height:48px;line-height:48px;}
        .item::before {content:".";padding-right:10px;};
    </style>
</head>

<body>
    <div id="result"></div>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
    $(document).ready(function() {
        $.ajax({
            type: "GET",
            url: "list.json",
            dataType: "json",
            success: function(data) {
                $.each(data, function(i, item) {
                    var hahaid = item.id
                    var content ="<div class="item">";
                        content +="<a href=3.html?id=" + hahaid + ">" + item.title + "</a>";
                        content +="</div>";
                    $("-sharpresult").append(content);
                })
            }
        })
    });
    </script>


</body>
</html>
Mar.05,2021

$.each(data.slice(0,10),```````

let showData = data.slice(0,10)

if(i<10){
    // 
}

the data is cached after it is fetched once, and then paged or scrolled as needed.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30d52-2bd73.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30d52-2bd73.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?