const array1 = [         {
                "type_id": 2,
                "type_name": "电视剧"
            },
            {
                "type_id": 4,
                "type_name": "动漫"
            },
            {
                "type_id": 1,
                "type_name": "电影"
            },
            {
                "type_id": 3,
                "type_name": "综艺"
            }];
const found = array1.find(e => e.type_id ===3 );
console.log(found);

运行结果

 { type_id: 3, type_name: "综艺" }

标签: none

添加新评论