Rrrrnnyg
Rrrrnnyg3w ago

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?
No description
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....
Jump to solution
8 Replies
Gaurav Chadha
Gaurav Chadha3w ago
Hi @Rrrrnnyg, could you please log the value of Postgres RPC, using logging node before return node? Is the result an object?
Rrrrnnyg
RrrrnnygOP3w ago
Hi, yes the value of Postgres RPC is an object. Logging node displayed the correct data, but the return node says "undefined ".
No description
Rrrrnnyg
RrrrnnygOP3w ago
No description
Gaurav Chadha
Gaurav Chadha3w ago
You can check workflow logs instead to know the actual value of postres result
Rrrrnnyg
RrrrnnygOP3w ago
Yes I checked the log , actual value of postres result is correct.
No description
Gaurav Chadha
Gaurav Chadha3w ago
@Rrrrnnyg, its an array not a json, due to which it is resulting as undefined.
Solution
Gaurav Chadha
Gaurav Chadha3w ago
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.
Rrrrnnyg
RrrrnnygOP3w ago
Thanks a lot . The issue is solved.