How can I remove description:("Auto-generated by YouTube.")
from title
?
[
{
title: 'DÁKITI description:("Auto-generated by YouTube.")',
author: 'Bad Bunny',
duration: 205090
}
]
Thanks in advance!
How can I remove description:("Auto-generated by YouTube.")
from title
?
[
{
title: 'DÁKITI description:("Auto-generated by YouTube.")',
author: 'Bad Bunny',
duration: 205090
}
]
Thanks in advance!
use map array method, i guess you have other elements in the array with the same substring, then for each one use replace string method:
By using the
delete
operator.delete arr[0].description
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete
I hope this is usefull for uh .Using the map method and replace value .