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

Did you find this page helpful?