[Vuejs]-How to set up lenght string in array

0👍

First of all – it’s not array, it’s object.
If you need just to trim your string, you can use usual js string function – trim():

{{ product.description.trim() }}

Otherwise, if you need to cut your string due to max length you can use substr():

{{ product.description.substr(0, maxlength) }}

Leave a comment