I have array like this below
const spetialCharector = [
"http://www.curryconfigurator.org/cc#Quantity",
"http://purl.org/heals/food/Texture",
"http://www.curryconfigurator.org/cc#FoodItem",
"http://www.w3.org/2001/XMLSchema#float"
"http://purl.org/heals/food/hasIngredient"
]
but i want the output like this below
const RemoveSpecialCharectorArray =["Quantity" , "Texture" , "FoodItem" "float" , "hasIngredient"]
Anyone can help me out please if it solved that so much appreciatable
const input = [
"http://www.curryconfigurator.org/cc#Quantity",
"http://purl.org/heals/food/Texture",
"http://www.curryconfigurator.org/cc#FoodItem",
"http://www.w3.org/2001/XMLSchema#float",
"http://purl.org/heals/food/hasIngredient"
]
let output = input.map((item) => {
let slashSplit = item.split('/')
let hashtagSplit = slashSplit[slashSplit.length-1].split('#')
return hashtagSplit[hashtagSplit.length-1]
}
)
console.log(output)