hjortur17
128
3
Vue

Get data from v-model

Posted 1 week ago by hjortur17

How do I get the value from a clicked v-model. So I have a input with a v-model on it which returns this:

selectedServices:Array[1]
    0:Object
        carType:"Fólksbíll"
        created_at:"2019-08-10 03:06:47"
        description:"Bón að innan"
        id:3
        price:50000
        updated_at:"2019-08-10 03:06:47"

And I'm trying to get the price and desc. like this:

addServicesToArray() {
    return this.selectedServicesPrices.push(this.selectedServices.price);
    return this.selectedServicesDesc.push(this.selectedServices.description);
}

Please sign in or create an account to participate in this conversation.