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