Reference Specific Value In JSON Output
I have a node that queries a firebase collection. it returns the results as a document body which is JSON formatted.
[ { "id": "FwzmcJPXTxduI9hxHR94", "data": { "Authentication": "value", "ConnectionID": "Value", "Location": "LocationID" } } ]
I need to use the authentication value in the next node but do not know how to reference only the authentication value. in javascript I would say {{ Nodename.data.authentication }} How do I reference this?
I even tried some of the JSON nodes but still no luck.
2 Replies
AI Support Bot Information
<@819257502801330196> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human!
Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers.
Please note: Team members will review and answer the questions on best efforts basis.
AI Response
To reference a value from a previous node in BuildShip, you should use the context menu to map the outputs. For example, if a node returns a document body and you want to reference a specific property like "Authentication", you would typically navigate as follows:
1. Access the Context Object: When configuring the next node, use the expression editor to access the values from the previous node by referring to the context path provided.
2. Navigate to the Desired Property: Use the syntax
ctx['Nodename']['data']['Authentication']
to access the "Authentication" value. Replace "Nodename" with the actual node name or a known variable that holds the output of your previous node.
The method you tried, {{ Nodename.data.authentication }}
, resembles templating syntax found in other environments and might not directly work in BuildShip.
If you're using JSON nodes and facing issues, ensure that the JSON path is accurately specified. The syntax and method to access specific node outputs can vary slightly based on the framework and the way data is structured. Ensure that you have the correct reference path by utilizing the context menu in BuildShip or by reviewing the outputs of previous nodes in a test run to confirm the data structure.
If you continue to face issues, consider checking the detailed documentation or reach out to support for guided assistance on correctly referencing node outputs .
BuildShip AI Support