I am attempting to convert my array into a JSON format where it will display the Skill Score for each element in the array.
I attempted to accomplish this by using the .map function and then outputting the result as a JSON string, as demonstrated in the code snippet below.
if(Capability == 'CCM'){
var newArray = this.finalSkills.map(function(item) {
return {'Skill Score' : item}
})
console.log(JSON.stringify(newArray))
}
I was hoping to see output like: { SKill Score: 3 } { Skill Score: 2 }
However, instead of the expected output, my browser console is displaying ƒ stringify() { [native code] }.