loopback upsert
snippet in javascript

loopback upsert

user4916

PersistedModel.upsert(data, callback)

loopback find or create

user8178

 await server.models.Role.findOrCreate(
 	{where: {name: val} },
 	{name: val}
 );

loopback create many

user3850

this.productApi.create(
  [
    {name: "Toy Car"},
    {name: "Purse"},
    {name: "Charger"}
  ]
).subscribe((res)=>console.log(res))