Javascript 从存储在nedb文档中的数组中删除项

Javascript 从存储在nedb文档中的数组中删除项,javascript,nedb,Javascript,Nedb,我将此数组存储在我的nedb实例中: proxy: Array(10) 0: {referrer: true, anonymity: "elite", country: "IN", ipPort: "150.129.115.118:48071", userAgent: true, …} 1: {get: null, userAgent: null, ipPort: "51.254.237.77:3129", port

我将此数组存储在我的nedb实例中:

proxy: Array(10)
0: {referrer: true, anonymity: "elite", country: "IN", ipPort: "150.129.115.118:48071", userAgent: true, …}
1: {get: null, userAgent: null, ipPort: "51.254.237.77:3129", port: "3129", anonymity: "elite", …}
2: {port: "43399", referrer: true, protocol: "http", get: true, https: true, …}
3: {cookies: true, ip: "78.29.42.10", post: true, get: true, userAgent: true, …}
4: {ip: "179.124.242.34", userAgent: true, country: "BR", cookies: true, referrer: true, …}
5: {referrer: true, userAgent: true, city: null, ip: "41.60.237.83", cookies: true, …}
6: {post: true, protocol: "http", country: "TH", referrer: true, userAgent: true, …}
7: {post: true, cookies: true, port: "8080", ip: "189.85.89.76", referrer: true, …}
8: {ip: "36.72.155.66", anonymity: "elite", protocol: "http", port: "8080", https: true, …}
9: {ipPort: "51.15.98.146:3128", https: true, post: true, port: "3128", protocol: "http", …}
我想从中删除一个条目,但找不到正确的方法,我已尝试使用以下代码:

    db.proxyList.remove({ proxy: rnd }).then( (doc) => {
      console.log(doc);
    });
但它将始终返回0,并且要删除的条目不会被删除。我使用存储在var rnd中的随机值来选择数组索引,该值是这样生成的:
让rnd=Math.floor(Math.random()*list[0].proxy.lenght)
。如何使用数组索引删除所需的项