Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

not able to use increment in payload :update api

default discord avatar
abdullahasad7253last year
1

const userKeywords=['coding','music']


const resKeywords = await payload.update({


collection: "keywords",


where: {


keyword:{ in:userKeywords },


},


data: {


$inc:{weight:1}


},


});


console.log(resKeywords)

  • discord user avatar
    denolfe
    last year

    That type of operation is not supported by the API

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.