Hi there,
I was wondering how I can get the JSON from different elements, let me show it:
I got the Status and Erro message, but I could not get the postcode
return ([
{json: {
"http1_status_3_position": $item(2).$node["http1"].data["status"],
"http1_status_3_postcode": $item(2).$node["http1"].data["status"],
"htp2_error_message": $item(1).$node["http2"].data["error"]
}}
])
I got a solution:
"http1_status_3_position": $item(2).$node["http1"].data["status"],
"http1_status_3_postcode": $item(2).$node["http1"].json['result']["country"],
"htp2_error_message": $item(1).$node["http2"].data["error"]
If you want to recover postcode, you need to add your need this way:
$item(2).$node[“http1”].data[“result”][“postcode”]
What are the ways to access the node?
for example
- return $items(‘NODE_NAME’);
- return $items(“NODE_NAME”, 0, 0)[0].json