so i have an array of objects which returns phoneNumber and businessNumber and name. I am trying to extract the businessNumber and phoneNumber and want to slice them from \"-\"
you could return both numbers in an array of new objects
let arr1 = myArray.map(function(obj) { return { businessNumber: obj.businessNumber.split('-').pop(), phoneNumber: obj.phoneNumber.split('-').pop() } })