import { NextApiRequest, NextApiResponse } from "next"; import abroad from "../../../../data/aptLifestyle/abroad.json"; import { Type } from "../../../../types"; export default async function handler( req: NextApiRequest, res: NextApiResponse ) { const { query: { code } } = req; const foundData = (abroad as Type[]).filter( (item) => String(item.code) === (code as string) ); // if (foundData.leng..