The community member is trying to connect to a database and needs to include a function call with arguments in the request body, but the body field requires valid JSON format. The issue is that the function call includes double quotes around the argument, which conflicts with the JSON syntax. The community members discuss different ways to escape the double quotes, and one of the solutions provided is to use template literals to include the function call: {"query":`Functionname("${system.params.name}")`}. This solution is noted as working.
Hey, I want to connect to a database and in the Body field of the resource, I need to have something like this: {"query":"Functionname("system.params.name")"}
However, the Body field does not let me input it that way and "needs a valid JSON". The second " around system.params.name are the problem but I need them for the request. I understand, that I need some kind of escape, but dont know the syntax. Can you help me out here? Thanks!
No, my database allows to send call functions with arguments inside the body. It however is very demanding with the correct syntax and needs any data of type string to be wrapped in "