First, get the list of all existing assets using the following:
return getAssetRegistry('org.example.Vehicle')
.then(function (vehicleAssetRegistry) {
// Get all of the vehicles in the vehicle asset registry.
return assetRegistry.getAll();
})
This will display all the assets present along with their string ID
And then get the particular asset:
return getAssetRegistry('org.example.Vehicle')
.then(function (vehicleAssetRegistry) {
// Get the specific vehicle from the vehicle asset registry.
return assetRegistry.get('<String ID>');
})