[HELP] ESX vehicle shop database table get model number

what I am trying to do is to get the model number

when buying vehicles in ESX vehicle shop it saves as an array inside the column ‘vehicle’ like this

{
    "modTurbo":1,
    "modSuspension":-1,
    "modTrunk":-1,
    "fuelLevel":60.0,
    "modOrnaments":-1,
    "model":296357396,
}

what I am using to get everything from database table

client.lua

ESX.TriggerServerCallback('getVehicles', function(result)
    for k, v in pairs(result) do
        TriggerEvent('sendVehicleInfo', -1, v)
    end
end)

-- populating a menu
RegisterNetEvent('sendVehicleInfo')
AddEventHandler('sendVehicleInfo', function(v)
	table.insert(ownedVehicles_menu, {
		label = plate,
		value = plate
	})
end)

server.lua

ESX.RegisterServerCallback('getVehicles', function(source, cb)
    MySQL.Async.fetchAll('SELECT * FROM owned_vehicles', {'users', {['id'] = id}},
    function(result)
       cb(result)
    end)
end)

can anyone point me in the right direction?

Do you mean the model hash?

Your script include it but its on
result.vehicles or result.vehicle
not sure
im on mobile now.

You have to json.decode() first

Not sure if this going to work

RegisterNetEvent(‘sendVehicleInfo’)
AddEventHandler(‘sendVehicleInfo’, function(v)
local model = json.decode(v.vehicle).model
print(model) – print to f8
– or v.vehicles
table.insert(ownedVehicles_menu, {
label = plate,
value = plate
})
end)

See if there is some print from f8

This is depends ln your esx veh shop version

It worked!
Thank you very much