I want to find a mean to filter all each keyword from my API call result who i storing in my list:
const jList = [];
result.data.results.forEach((element) => {
jList.push(element)
});
That my api url call but it dosen't have parameters value i wanted :
h..s://api/...&results_per_page=20&what="lead-manager"&content-type=application/json"
...but i saw they are present directly on API call result, so i trying this to getting each parameters like : title
, company
unfortunately it not working
for (element of jobList) {
title: { result.data.results.[].title },
created: { result.data.results.[].created },
description: { result.data.results.[].description },
company: { result.data.results.[].company }
}
console.log(title)
How i can get each parameters from element ??
So please help me, Thanks
CodePudding user response:
did you try using map ?
result.data.results.map((item) =>{ console.log(item.title) })