how to filter array keys
const menu_type = menus.filter(menu => menu.type); the JSON has a type key that is not a ‘Show All’ value. now I filter the menus menus.type !== Show All Method 1 const [filteredMenus, setFilteredMenus] =useState([]); const getFilteredMenus = () => { if (activeTab === ‘Show All’) { setFilteredMenus(menus) } setFilteredMenus(menus.filter(menu => menu.type === tabs[0])) } const […]
json date format to YYYY-MM-DD from 2001-09-10T21:00:00.000Z
i got this json file