Python Json Check Array Count Javascript Array Filter