''\' character is getting added when executing in graphql
Not able to figure out how i can get rid of '' character. I have tried few things but it didnt work out for me. I think postgressql changes json string like that.
Solution 1:[1]
You don't need to "get rid of" the backslash (\
) characters because they're not really there. They are escape characters that are required when a double-quoted string literal contains double-quotes within it:
>>> res = "[\"jay\", \"dhar\"]"
>>> print(res)
Solution 2:[2]
I do realize now that the back slash is a representation and its not coming when i am posting the data. . Thanks for taking the time to contribute an answer. It’s because of helpful peers like yourself that we’re able to learn together as a community :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | jayshri dhar |
Solution 2 | jayshri dhar |