I received an error message stating
Property 'map' does not exist on type 'string | string[]'
:
const data = [
['1', ['11']],
['2', ['21']],
['3', ['31']],
]
data.map(topic => {
topic[1].map(p => console.log(p))
})
How can I resolve this issue while keeping the code functionality intact?
This query pertains to a JavaScript code snippet in an Astro project, and TypeScript is not being used.