I got data from the script tag of the website and i stored it in a variable but i am not able to get the values single by signle as if i display data.description it gives me undefined
Here is the code :
const axios=require('axios');
const cheerio=require('cheerio')
axios.get('https://www.pakwheels.com/used-cars/lahore/24858').then((res)=>{
const $=cheerio.load(res.data)
var data
data=$('.classified-listing').first().children('script').text().toString();
// console.log(data1.description)
console.log(data)
})
It gives this output on console Here is i console it directly
But if i display with with this
console.log(data1.description)
It show me undefined i need to get a specific chunk of data
Need a specific chunk of data