Here is my code
const Res = await fetch(`https://foo0022.firebaseio.com/.json`); const ResObj = await Res.json(); if (!Res.ok || !ResObj) { throw new Error("Page Not Found 404"); } const ResArr = await Object.values(ResObj) .map(v => Object.values(v).flat())//error .flat() .filter(({ title }) => title.includes(Search))
In the line In the line I get this error ".map (v => Object.values (v) .flat ())" I get this error Argument of type 'unknown' is not assignable to parameter of type '{}'.How can this problem be solved?