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