import * as IPFS from 'ipfs-core'
var ipfs = await IPFS.create({ repo: 'ok' + Math.random() })
const metadataMap = new Map()
//content.metadataCid is the ipfs-cid of the metadata.json file stored on ipfs.
var res = await ipfs.cat(content.metadataCid)
//var data = await res.Json()
console.log("** Metadata from Cid **")
console.log(res)
//This just maps the content (content-cid) to its metadata
//sets the metadata for each Content
metadataMap.set(theCid, res)
if (metadataMap) {
console.log('**metadata map**')
console.log(metadataMap)
}
The console -
I am hosting those metadata files on pinata as well as on my desktop-ipfs. And you can access it using ipfs cli or gateways. eg_link: ipfs://bafybeibro7fxpk7sk2nfvslumxraol437ug35qz4xx2p7ygjctunb2wi3i/
The link opens in the browser using ipfs-gateway just fine:

But when I use ipfs.cat(), the console just shows cat {suspended} (as shown in the image attached)]
I can access the image stored on ipfs using "img" tag without any problem:
In the image above, the images are from ipfs. I also wanna show title and description which is stored in that json file on ipfs
Same issue with ipfs.get() !
How can I access that metadata.json file and parse them. Am I missing any step here?
thanks 🤞