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

Did you find this page helpful?