如何使用javascript从多维关联数组中删除数组?

时间:2016-03-03 09:32:22

标签: javascript arrays json multidimensional-array associative-array

[{"email":"akhiltrivedi@outlook.com","pass":"akhil@1","name":"akhil","car1":"zen","year1":"2012","member":"no","mobile":"(903) 309-8713"},{"email":"anandpatel@gmail.com","pass":"Smith@1","name":"suresh","car1":"zen","year1":"2012","member":"yes","mobile":"(903) 309-8799"},{"email":"contact@akhiltrivedi.com","pass@1":"akhil@1","name":"rakesh","car1":"zen","year1":"2012","member":"no","mobile":"(903) 309-2233"},{"name":"akhil","email":"akhiltrivedi@outlook.india","pass":"akhil@123","mobile":"(903) 309-8713","car1":"zen","car2":"","year1":"2012","year2":"","member":"yes"},{"name":"karan","email":"contact@akhiltrivedi.com","pass":"akhil@123","mobile":"(903) 309-2233","car1":"zen","car2":"","year1":"2012","year2":"","member":"yes"}]

这是我的数组,我想删除包含电子邮件ID = akhiltrivedi@outlook.com的数组,那么,我该如何删除它?

1 个答案:

答案 0 :(得分:0)

我建议使用Array#filter()并将结果分配给想要的变量。



<?php echo get_header('custom');?>
&#13;
&#13;
&#13;