Rrrrnnyg - Hello, I want to get username's valu...
Hello, I want to get username's value from the RPC output, but it got a error says " Unexpected identifier root" , did I do it wrong?
Solution:Jump to solution
If the PostgresRPC value has a single array you can get the value like this:
(x)Postgres RPC[0].username
, here the (x)Postgres RPC is the same variable you used earlier. We can use this dot notation to get the value of username from the array....8 Replies
Hi @Rrrrnnyg, could you please log the value of Postgres RPC, using logging node before return node? Is the result an object?
Hi, yes the value of Postgres RPC is an object. Logging node displayed the correct data, but the return node says "undefined ".
You can check workflow logs instead to know the actual value of postres result
Yes I checked the log , actual value of postres result is correct.
@Rrrrnnyg, its an array not a json, due to which it is resulting as undefined.
Solution
If the PostgresRPC value has a single array you can get the value like this:
(x)Postgres RPC[0].username
, here the (x)Postgres RPC is the same variable you used earlier. We can use this dot notation to get the value of username from the array.Thanks a lot . The issue is solved.