upsert loopback example Example: loopback find or create await server.models.Role.findOrCreate( {where: {name: val} }, {name: val} );