I make a call to an API
The API returns a result like:
{saved-jobs:[{/*item*/},{/*item*/}]}
I want to access each 'saved-jobs' like so:
success: function(result){
$.each(result.saved-jobs, function(i, saved_job){
console.log(saved_job.job_id)
});
},
only thing is, the ' - ' in saved-jobs causes an error. I don't have the ability to modify the API and what it returns. how can I get around it?